Can you design a scalable database for an e-commerce site like Flipkart?

System Design
Hard
Flipkart
120.9K views

A system design question targeting technical roles. It assesses knowledge of scalability, data modeling, and handling high traffic loads.

Why Interviewers Ask This

E-commerce platforms handle massive amounts of data and traffic, especially during sales events. Interviewers need to verify if the candidate can architect systems that remain responsive and reliable under load. This question evaluates understanding of sharding, replication, caching, and database normalization in a distributed environment.

How to Answer This Question

Start by clarifying requirements like read/write ratios and data volume. Discuss horizontal vs. vertical scaling. Propose a schema that separates user data, products, and orders. Mention the use of NoSQL for flexible data structures and SQL for transactional integrity. Include strategies like caching layers (Redis) and load balancing.

Key Points to Cover

  • Microservices architecture
  • Database selection (SQL/NoSQL)
  • Sharding and replication
  • Caching strategies

Sample Answer

For a platform like Flipkart, I would start with a microservices architecture where each service manages its own database. For the product catalog, I'd use a NoSQL database like MongoDB for flexibility in handling varied attributes. User transactions would rely on a relational database like PostgreSQL with read replicas to handle high query volumes. I would implement sharding based on user ID to distribute load and use Redis for caching frequently accessed product details to reduce latency during peak traffic.

Common Mistakes to Avoid

  • Ignoring scalability needs
  • Proposing a single monolithic database
  • Overlooking read-heavy workloads

Practice This Question with AI

Answer this question orally or via text and get instant AI-powered feedback on your response quality, structure, and delivery.

Start Practicing

Related Interview Questions

Browse all 165 System Design questionsBrowse all 81 Flipkart questions