0
0
Microservicessystem_design~5 mins

Rate limiting in Microservices - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is rate limiting in system design?
Rate limiting is a technique to control how many requests a user or client can make to a service in a given time. It helps prevent overload and abuse.
Click to reveal answer
intermediate
Name two common algorithms used for rate limiting.
Two common algorithms are Token Bucket and Leaky Bucket. They help decide when to allow or reject requests based on limits.
Click to reveal answer
beginner
Why is rate limiting important in microservices?
Rate limiting protects microservices from too many requests that can cause crashes or slowdowns. It ensures fair use and system stability.
Click to reveal answer
intermediate
What is the difference between fixed window and sliding window rate limiting?
Fixed window counts requests in fixed time blocks (like per minute). Sliding window tracks requests continuously over time for smoother limits.
Click to reveal answer
advanced
How can distributed rate limiting be implemented across multiple servers?
Distributed rate limiting can use a shared data store like Redis to keep counters consistent across servers, ensuring limits apply globally.
Click to reveal answer
What is the main goal of rate limiting?
AIncrease the number of requests a user can make
BPrevent system overload by limiting requests
CStore user data securely
DImprove database query speed
Which algorithm allows bursts of requests but controls average rate over time?
ASliding window
BFixed window
CToken bucket
DRound robin
In microservices, why might you use a shared Redis store for rate limiting?
ATo synchronize rate limits across servers
BTo cache images
CTo store user passwords
DTo log errors
What happens when a client exceeds the rate limit?
AThe request is rejected or throttled
BThe request is delayed indefinitely
CThe client is permanently banned
DThe request is accepted and processed
Which rate limiting method provides smoother control by tracking requests continuously?
ALeaky bucket
BFixed window
CToken bucket
DSliding window
Explain how rate limiting helps maintain system stability in microservices.
Think about what happens if too many requests hit a service at once.
You got /4 concepts.
    Describe the difference between fixed window and sliding window rate limiting techniques.
    Consider how requests are counted over time.
    You got /4 concepts.