Does the throttle rule retriever poll the db for updates? If not, does it learn about rule updates via some sort of pub-sub, and do we need that building block here? If it does poll, what do you think of having whatever process updates the rule also update the cache, with a write-through or write-back approach? Benefits:
- We have one fewer component in our system (the poller) for which we must build and track metrics and alarms
- Since rule updates are infrequent, a push model will result in many fewer operations than a pull model
- If the pull model offset this by pulling infrequently, we’d get data inconsistencies between db and cache, which a write-through or write-around approach would resolve
Course: Grokking Modern System Design Interview for Engineers & Managers - Learn Interactively
Lesson: Design of a Rate Limiter - Grokking Modern System Design Interview for Engineers & Managers