Tag: Rate Limiter
-
Rate Limiter #3 – Sliding Window Algorithm
Advantages / Disadvantages Advantages Disadvantages Implementation Implementation – Output FollowUp Questions #1. How does your Sliding Window Counter implementation handle memory consumption, especially with high request rates or large window sizes? Are there optimizations to reduce memory usage? #2. The same FollowUp Question #1~#5 in https://willtheguruhome.wordpress.com/2025/01/12/rate-limiter-token-bucket-algorithm/ is possible
-
Rate Limiter #2 – Leaky Bucket Algorithm
Advantages / Disadvantages Advantages Disadvantages Implementation Implementation – Output FollowUp Question #1. In your outflow() method, you calculate secondsSinceOutflow by dividing the time difference in milliseconds by 1_000. Is this approach accurate for refilling the bucket? Why or why not? #2. How efficient is your LeakyBucketRateLimiter implementation in terms of…
-
Rate Limiter #1 –Token Bucket Algorithm
Advantages / Disadvantages Advantages Disadvantages Implementation Implementation – Output FollowUp Question #1. Is it thread-safe? How does it handle concurrent requests? #2. Can you implement a lock-free approach for Rate Limiter? #3. How would you adapt your rate limiter to function correctly in distributed system? #4. How should you update…
