The Case for Starting with a Monolith

A recent discussion highlights that monolithic architectures can enable teams to ship up to 3x faster with simpler operations, even at massive scale. Shopify, for example, handled $14.6B on Black Friday with a monolith. The argument is to start monolithic and only extract services when specific pain points arise, challenging the 'microservices-first' dogma.

The "Majestic Monolith," a term popularized by David Heinemeier Hansson, creator of Ruby on Rails, challenges the idea that scalability requires a distributed microservices architecture from day one. This approach advocates for a single, well-structured application that can power massive-scale operations, exemplified by Shopify and GitHub, which run on millions of lines of code within their core monolithic systems. The philosophy prioritizes developer productivity and speed by avoiding the upfront operational complexity of a distributed system. This isn't about building a "big ball of mud." The modern approach is the "Modular Monolith," which organizes the single codebase into distinct, loosely coupled modules, often aligned with business domains or what Domain-Driven Design calls "Bounded Contexts." Each module has explicit interfaces and may even have its own database schema, enforcing clear boundaries that prevent the tangled dependencies that plague legacy monoliths and make future extraction into a microservice feasible if necessary. For enterprises in sectors like logistics and retail, this translates to simpler initial development for complex systems like Warehouse Management Systems (WMS). An IoT platform, for instance, might start as a monolith to rapidly deploy core device management and data ingestion features, only breaking out specific components like high-volume event stream processing when performance bottlenecks become a concrete problem. The decision to decompose a monolith is often driven by organizational scaling, not just technical limits. As engineering teams grow and become geographically distributed, for instance between the US and India, a monolithic codebase can create development bottlenecks. When multiple teams are consistently blocked or slowed down by contention on a single codebase, it can be a primary trigger to extract services, allowing for more team autonomy. Prominent figures like Martin Fowler and Sam Newman have long advocated for a "monolith-first" strategy, arguing that you should only break out services when the monolith becomes a problem. The key is that you don't fully understand the correct service boundaries in a new system, and refactoring within a monolith is vastly simpler than across a distributed network. The operational cost and complexity of microservices are significant and often underestimated. Kelsey Hightower, a notable voice in the cloud-native community, frames it as a pragmatic choice, cautioning that microservices can become a "fashion" that teams adopt without understanding the immense overhead in networking, monitoring, and data management. The recent trend of companies consolidating services to reduce costs underscores this complexity. However, the approach isn't without its critics. The discipline required to maintain modularity in a monolith is high, and it's easy for boundaries to erode under pressure. For systems with well-understood domains from the start, or for organizations with mature DevOps practices, beginning with a few coarse-grained services might be a more effective path to achieving team autonomy and independent deployment cadences. Ultimately, the future likely lies in a hybrid approach. An architecture might evolve into what DHH calls "The Citadel": a majestic monolith at the core handling primary business functions, supported by a few distinct service "outposts." These outposts handle specific, divergent needs like high-volume, isolated tasks—a pragmatic evolution that balances the simplicity of a monolith with the targeted scalability of services.

Get your own daily briefing

Scout delivers personalized news, insights, and conversations tailored to your role and industry.

Download on the App Store

Shared from Scout - Be the smartest in the room.