Scalability for Twitter System Design
Let us identify and resolve Scalability such as single points of failure in our design:
- “What if one of our services crashes?”
- “How will we distribute our traffic between our components?”
- “How can we reduce the load on our database?”
- “How to improve the availability of our cache?”
- “How can we make our notification system more robust?”
- “How can we reduce media storage costs”?
To make our system more resilient we can do the following:
- Running multiple instances of each of our services.
- Introducing load balancers between clients, servers, databases, and cache servers.
- Using multiple read replicas for our databases.
- Multiple instances and replicas for our distributed cache.
- Exactly once delivery and message ordering is challenging in a distributed system, we can use a dedicated message broker such as Apache Kafka or NATS to make our notification system more robust.
- We can add media processing and compression capabilities to the media service to compress large files which will save a lot of storage space and reduce cost.
Designing Twitter – A System Design Interview Question
Designing Twitter (or Facebook feed or Facebook search..) is a quite common question that interviewers ask candidates. A lot of candidates get afraid of this round more than the coding round because they don’t get an idea of what topics and tradeoffs they should cover within this limited timeframe.
Important Topics for Designing Twitter
- How Would You Design Twitter?
- Requirements for Twitter System Design
- Capacity Estimation for Twitter System Design
- Use Case Design for Twitter System Design
- Low Level Design for Twitter System Design
- High Level Design for Twitter System Design
- Data Model Design for Twitter System Design
- API Design for Twitter System Design
- Microservices Used for Twitter System Design
- Scalability for Twitter System Design