Non-functional requirements
Let’s put down the non-functional requirements for this design problem:
- Availability: The system should be highly available.
- Scalability: The system should be highly scalable (100M users) and be able to tolerate request spikes.
- Latency: Since restaurants’ menus don’t change often and restaurants don’t open and close very frequently, there are not many write requests happening. Read latency should be within 200 ms.
- Consistency: Occasionally, when the restaurants are updated, it’s fine to support eventual consistency.
- Reliability: The system should behave correctly and deliver the functional requirements even in the case of failures, request spikes, and other outages.