Archive for December 2022

System Design Interview - Chapter 4 - Design a Rate Limiter

System Design Interview - Chapter 4 - Design a Rate Limiter

Translations: RU

Every popular software should have a Rate Limiter. It prevents DDOS attack, reduces cost and prevents servers from being overloaded.

There are some tricky questions to be considered during implementation of Rate Limiter:

  • Where to put Rate Limiter: client-side, server-side, gateway?
  • Algorithms for rate limiting. There are many algorithms with pros and cons: Token bucket, Leaking bucket, Fixed window counter, Sliding window log, Sliding window counter. Your business needs will define the right algorithm.
  • How are rate limiting rules created?
  • Where are the rules stored?
  • How to handle requests that are rate limited?

These questions are disclosed in a very interesting Chapter 4 of the book:

System Design Interview - Chapter 3 - A Framework for System Design Interviews

System Design Interview - Chapter 3 - A Framework for System Design Interviews

Translations: RU

Four standard steps for system design interview. However, I would think about them wider: as about four initial steps to design the software.

  • Step 1. Understand the problem and establish design scope
  • Step 2. Propose high-level design and get buy-in
  • Step 3. Design deep dive
  • Step 4. Wrap up

The chapter 3 of the book discovers details about each step, good questions to ask (to think about), DO’s and DONT’s. It also shows good example of the process of designing a news feed system.