Design Per-Plan Message Caps for Premium Models in ChatGPT
Last updated: November 29, 2026
Quick Overview
Design the system that enforces usage caps such as a fixed number of messages per rolling window on specific models per plan, and shows users how much they have left.
OpenAI
November 29, 20260
0
0 solved
Design the system that enforces usage caps such as a fixed number of messages per rolling window on specific models per plan, and shows users how much they have left.
ChatGPT applies different limits to different models depending on whether a user is on Free, Plus, Pro or a workspace plan. In a phone screen the interviewer wants a clear, correct design with a sensible data structure for rolling windows and a friendly fallback when a cap is hit.
What the Interviewer Expects
- Define the limit configuration per plan and model
- Choose a rolling-window counting method and storage
- Check and increment atomically on each message
- Tell the user remaining usage and reset time, and offer a fallback model
- Make limits changeable without a deploy
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- How would you change the window from 3 hours to 5 hours without resetting everyone?
- Should a failed or regenerated response count?
- How would you handle a workspace that shares a pool of messages?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
- Config such as: Plus gets N messages per 3 hours on model X and M per week on model Y; Free gets fewer.
- When the cap is hit, block that model and suggest a fallback, with the reset time.
- Show a ...
High-Level Design
- Limits config stored centrally and cached in each chat service instance:
(plan, model) -> list of (window, max). - Usage store in Redis: per
(user, model, window)a sliding-window counte...