![]() |
VOOZH | about |
We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.
Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.
Follow TNS on your favorite social media networks.
Become a TNS follower on LinkedIn.
Check out the latest featured and trending stories while you wait for your first TNS newsletter.
This article is the first in a series. Read more:
Aside from depicting a charming but homicidal AI, the movie “2001: A Space Odyssey” is perhaps best remembered for its monoliths. Seemingly out of nowhere, these perfectly smooth and space-black slabs compel prehistoric apes — and later, an advanced team of astronauts — forward to touch and understand them, to see into whatever secrets they might contain.
The film stays purposely ambiguous about the meaning of these monoliths. Instead of offering a specific truth, they reflect humanity’s ambition and growth to whoever might observe them.
Developers have a different conception of monoliths. Equally mysterious and compelling but usually lacking in the perfect proportions and peerless finish, software monoliths tell the story of how a team has designed and grown an application through refactorings, key hires and departures, and dramatic shifts in business requirements.
Unlike the ambiguity of the film’s monoliths, the stories of monoliths in software go only one of two ways:
In the beginning, your monolith isn’t often mourned. Microservices simplify the way you scope the impact of major or breaking changes across your app, and your peers love that they can develop new APIs in anything but JavaScript. Once again, everyone starts to feel like contributors, writing new features and solving complex optimization puzzles, not sitting in hours-long meetings to negotiate each major release of the old monolith.
The death of your monolith smooths over some hiccups around organizing developers and engineers, but it also introduces new technical requirements you hadn’t quite scoped initially. You start wondering: Was all this time we spent refactoring and configuring infrastructure, then dealing with the challenges of microservices, necessary, given the complexity of the engineering problems we face?
You picked microservices because you thought it would solve your technical problems when it’s best suited to solve organizational and collaborative issues that your company almost certainly doesn’t have. By letting your monolith die, you injected a lot of unnecessary complexity into your system, like:
You went from “writing bad code to building bad infrastructure,” as Kelsey Hightower warned, in search of the engineering discipline you wish you had from Day 1. Or, as David Heinemeier Hansson, CTO of Basecamp and creator of Ruby on Rails, argues, you added needless complication: “Replacing method calls and module separations with network invocations and service partitioning within a single, coherent team and application is madness in almost all cases.”
Now, in this “madness,” you start wishing you hadn’t killed off your monolith. Maybe, if you’re one of the lucky few, like the Segment team within Twilio, you can try again with a new type of monolith: one you build with intention.
This story begins one of two ways too:
As you continue down the monolithic road, this architecture scales successfully because you’re aware of the common fears and misconceptions.
“Developers don’t like working in monoliths.” There is no official polling for which developers prefer, but so long as the monolith remains performant, the developer experience of working in a single repository errs on the side of simplicity. With services separated by folders and calls — not IaC and languages and repositories — you can synchronize even major changes into a single pull request for better velocity and quality.
When the Segment team transitioned to an intentional monolith, they jumped from 32 improvements in their shared libraries in a year to 46 … in just the following six months.
“A monolith is just a black box that no one understands.” Many say the same about microservices.
“Monoliths are slow.” Monoliths aren’t a great candidate for vertical scaling, but they can be uniquely fast. Data transfer stays within process memory, cheaper and faster than machine-to-machine communication, and doesn’t have to hop through the orchestration logic of distributed services. When the time comes to scale horizontally, you rely on services with more predictable performance and cost, like AWS EC2, rather than betting on serverless options — and there are plenty of application performance monitoring tools, like Scout APM, specifically designed to help you identify optimization opportunities down to specific lines of code.
“Monoliths require so much more testing.” This seems like a good problem. As Hightower suggested, writing infrastructure isn’t the solution to writing bad code, which often comes down to writing poor tests. Or not enough.
“You don’t get to play with new (cloud native) tech!” Yes, a monolith won’t work on the latest serverless or container orchestration fad, but you still have options. For example, you can deploy a service mesh like Linkerd or Istio to connect your monolith to external services via mTLS. You can improve scalability with a load balancer and a multicloud deployment, or connect your app to an OpenTelemetry Collector to send logs, metrics and traces to one of the multitudes of observability solutions available today.
Aware of these misconceptions and their realities, you can also implement strategies for overcoming the genuine challenges of building a monolith:
The key is that you’re not building a monolith because it’s the default. That’s where even the best-intentioned monoliths go to die. You’re building a monolith with intention because it solves the first-order engineering problems your organization has right now. Because it’s still possible to hold your app in your head. Because you don’t want to have to start from scratch again once microservices fall out of favor and you realize you understand so little about what you’ve built.
Build one with intention and see for yourself: Monoliths are the right choice almost every time.
One of the biggest benefits of monoliths comes down to who benefits the most from ballooning costs due to microservices architecture. Stay tuned for the second piece in our series, but until then, a hint: It’s not you.