14 Design a text messaging app
- Designing an app for billions of clients to send short messages
- Considering approaches that trade off latency vs. cost
- Designing for fault-tolerance
Let’s design a text messaging app, a system for 100K users to send messages to each other within seconds. Do not consider video or audio chat. Users send messages at an unpredictable rate, so our system should be able to handle these traffic surges. This is the first example system in this book that considers exactly-once delivery. Messages should not be lost, nor should they be sent more than once.
14.1 Requirements
After some discussion, we determined the following functional requirements:
14.2 Initial thoughts
14.3 Initial high-level design
14.4 Connection service
14.4.1 Making connections
14.4.2 Sender blocking
14.5 Sender service
14.5.1 Sending a message
14.5.2 Other discussions
14.6 Message service
14.7 Message-sending service
14.7.1 Introduction
14.7.2 High-level architecture
14.7.3 Steps in sending a message
14.7.4 Some questions
14.7.5 Improving availability
14.8 Search
14.9 Logging, monitoring, and alerting
14.10 Other possible discussion topics