At Spring I/O 2025 in Barcelona, a question during an interview reminded me of one of the biggest conflicts in the software development industry: monolith or microservice?
That innocent question brought back hundreds of hours I had spent in heated discussions about whether a new microservice was necessary. With just one sentence and a minute to sum it all up, I gave the old reliable answer: “It depends,” and added another definitive yet ambiguous statement: “If it emerges organically, then it’s a microservice.” The interviewer looked confused and surprised, which told me I’d navigated the dilemma rather elegantly.
Back in the real world, the project I’m currently working on at Seat Code inherited around twenty-four microservices from two external teams. During the handover of one of them, the developers said that many of those microservices should never have been split off. My obvious question was: Why, then, were the microservices split up? An awkward silence and a few exchanged glances ended with: “Because that’s how it was done.”
Although microservices theory dates back to 2005, it became popular in 2014, when James Lewis and Martin Fowler wrote the article Microservices. At that point, their use began to spread unchecked. That made me think of Maslow’s Hammer:
“If all you have is a hammer, everything looks like a nail.”
In an environment full of bad practices and legacy systems, this architectural model promised paradise. Add the widespread adoption of DDD, and you get a simple, deadly formula:
Bounded context = microservice (not to be confused with microservice = Bounded context).
From then on, the situation got out of control. Projects that used to be one monolith now have twenty microservices and a monolith.
So, are all these new microservices wrong? The answer—the expected one for all complex problems and uncomfortable questions—is “it depends.”
To make an informed decision, I’ve put together a list of questions to help determine whether a microservice makes sense:
(For the purposes of this article, I’ll ignore limitations related to the development team.)
Now let me tell you about a real case. A few years ago, I worked at a company whose billing system was part of an ERP (EKON). These systems generally have standard models for issuing simple invoices to suppliers and perhaps some customers, but if you need something more complex, you usually have to resort to circus tricks. To give you an idea, the invoices were for an electricity retailer: lots of pages, lots of charts, endless fine print, several summary tables, and so on. It was all needed to comply with government regulations (this is a heavily regulated industry).
The situation became critical when the billing process degraded until it took three days to generate a total of 300,000 invoices.
The first step was to analyze what was causing the slowdown: calculating the data, creating the PDF, copying the PDF to a file manager, or something else.
To my surprise, the answer was PDF generation. I dug into the ERP and found some very old arcane magic. Since the system could only create one page per invoice, it created N invoices and then joined the pieces into the final document: Facturastein.
Clearly, this part of the process had to be replaced. There were two options: 1) add this functionality to the monolith, or 2) create an invoice (or document) printing microservice. We can apply the three questions above to this situation:
The way forward was clear. I won’t go into the implementation details in this article; I’ll probably share them in the near future. What I will say is that it was a complete success in every respect.
Billing no longer took three days; it took six hours on a single, very small machine. We couldn’t reduce it further because the bottleneck had shifted to another part of the system.
Back to the main topic: the important thing when deciding whether to create a microservice is that it should come from a genuine need and careful analysis—not because it’s trendy, because I like them, or because I want one on my résumé.