4. Design a rate limiter

✔ 해당 포스트는 System Design Interview An Insider’s Guide by Alex Xu의 서적을 번역하여 작성되었습니다.

Design A Rate Limiter

The benefits of using an API rate limiter

Step1. Understand the problem and establish design scope

Conclusion

Step2. Propose high-level desing and get buy-in

Where to put the rate limiter?

Algorithms for rate limiting

Step3. Design deep dive

1. Rate limiting rules

2. Exceeding the rate limit

2-1. Rate limiter headers

3. Detailed design

Alt text

4. Rate limiter in a distributed environment

4-1. Race Condition
4-2. Synchronization issue
4-3. Performance optimization
4-4. Monitoring

Step4. Wrap up