KatInterview

Identifying Weaknesses in a Simple Web Service Architecture

System DesignModel answer
EasyModel answerSystem Designarchitecturescalabilityreliability

Last updated

Analyze a basic web application topology and recommend architectural improvements for scalability, reliability, and fault tolerance.

You're reviewing the architecture for a web service that currently has this topology:

Users → DNS → Load Balancer → App Server → Database
                                    ↓
                            Third-Party API

Your task is to critique this design and suggest improvements. Consider:

  • What happens when traffic spikes or components fail?
  • Where are the single points of failure?
  • How will this system behave under load?
  • What issues arise from the external API dependency?
  • What's missing for production operations?

Walk through each layer systematically. For each weakness you identify, explain the failure mode and propose a specific remedy. Prioritize improvements that address the most critical risks first.

Context to establish:

  • Daily active users: ~10 million
  • Average request rate: ~2,000 RPS, peaking at ~10,000 RPS
  • Read-to-write ratio: approximately 10:1
  • Target latency: p99 < 300ms
  • Target availability: 99.9% (roughly 43 min/month downtime budget)
  • External API rate limit: 100 requests/second
  • External API availability: 99.5%

Hints

Hint 1

Start by identifying all single points of failure in the current architecture

Hint 2

The external API's 99.5% availability is lower than your 99.9% target—what does that mean if every request depends on it?

Hint 3

Consider both horizontal scaling (adding instances) and vertical concerns (caching, connection pooling) for the database