Discuss Microservices vs. Monolith Architecture

System Design
Easy
Meta
105K views

Compare and contrast Monolith and Microservices architectures. Discuss their respective advantages, disadvantages, and the point at which a monolithic system might need to be broken down.

Why Interviewers Ask This

Interviewers at Meta ask this to assess your ability to make trade-off decisions rather than just memorizing definitions. They want to see if you understand that architecture is context-dependent, evaluating your capacity to weigh scalability needs against operational complexity. This question reveals whether you can align technical choices with business goals and organizational maturity.

How to Answer This Question

1. Define both architectures clearly in one sentence each to establish a common baseline. 2. Contrast them across three key dimensions: deployment independence, database coupling, and team structure. 3. List specific pros and cons for each, focusing on real-world impacts like fault isolation versus development speed. 4. Discuss the 'tipping point' for migration, citing metrics like team count, failure domain size, or scaling bottlenecks. 5. Conclude by emphasizing that there is no perfect solution, only the right fit for the current stage of the product, reflecting Meta's pragmatic engineering culture.

Key Points to Cover

  • Acknowledge that architectural choice is a trade-off between operational complexity and development velocity
  • Highlight that microservices enable independent scaling and team autonomy but introduce distributed system challenges
  • Explain that monoliths are superior for early-stage products where speed of delivery is the priority
  • Identify specific triggers for migration, such as team size exceeding 10-15 people or distinct scaling requirements
  • Emphasize that the decision must align with the company's current maturity and business goals

Sample Answer

A monolithic architecture bundles all application logic into a single codebase and deployment unit, making it ideal for startups due to its simplicity in testing and debugging. In contrast, microservices decompose the system into loosely coupled, independently deployable services that communicate via APIs. The primary advantage of microservices is scalability; you can scale specific high-load components without replicating the entire app, and teams can work autonomously. However, this introduces significant complexity in distributed tracing, data consistency, and network latency. Monoliths suffer from the opposite: they are hard to scale horizontally and prone to cascading failures, but they offer rapid iteration speeds initially. A monolith should be broken down when the organization outgrows the 'two-pizza team' rule, typically around 10-15 developers per service area, or when different modules require vastly different scaling characteristics, such as a video processing engine needing GPU resources while the user profile service does not. At Meta, we often start monolithic to validate an idea quickly, then incrementally extract services only when the cost of coordination exceeds the benefits of modularity.

Common Mistakes to Avoid

  • Claiming microservices are always better, ignoring the heavy operational overhead required to manage them effectively
  • Failing to mention specific scenarios where a monolith remains the superior choice for long-term maintenance
  • Discussing technical details without connecting them to organizational factors like team structure or deployment frequency
  • Providing a generic definition without explaining the specific 'tipping point' criteria for migrating from one to the other

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 150 System Design questionsBrowse all 71 Meta questions