Ayush Poddar's Wiki

      • Business
      • Financial philosophies and lessons
      • Investments and Personal Finance
      • Taxation
      • Documentation on some tools
      • Events, anecdotes and facts
      • Life Philosophies
      • Politics, governance and legals
      • Productivity
      • Climate change
      • High level designs - Software Systems
      • Industrial production
      • Software engineering

    Rate limiter algorithms

    Dec 16, 20241 min read

    1. Token bucket rate limiting algorithm
    2. Leaking bucket rate limiting algorithm
    3. Fixed window counter rate limiting algorithm
    4. Sliding window log rate limiting algorithm
    5. Sliding window counter rate limiting algorithm

    Storing the counters of all the algorithms

    • Using database is not a good idea due to slowness of disk access.
    • In-memory cache makes sense because it is fast and supports time-based expiration strategy. Eg: Redis

    High level rate limiter architecture

    Related Notes

    Sources

    • (Done) Design A Rate Limiter - Highlights

    Graph View

    • Storing the counters of all the algorithms
    • Related Notes
    • Sources

    Backlinks

    • How to design a Rate Limiter

    Created with Quartz v4.4.0 © 2024

    • GitHub
    • Discord Community