Most organizations once started with a single system, and for some that system has grown over the years into a sluggish monolith that holds all critical business processes. In other companies, multiple applications are connected through an integration landscape, creating a collection of linked monoliths. Microservices, in turn, can be seen as small sub-processes of a monolith: very flexible and scalable. That immediately sounds a lot better than a monolithic application landscape, doesn't it? Still, all these forms have their pros and cons. In this blog article we explain what we mean by a monolith and by microservices, and discuss their pros and cons.
When a combination of functionalities sits within one extensive system, we speak of a monolith. You have one application and you do everything with it: HR, sales, marketing, service, etc. But you can also see an application for HR alone as a monolith, because all the functionality related to HR can be found in this system. If you want to grow and be able to scale, it is better to decouple functionalities from each other.
The advantage of a monolith is data integrity, because you store all data in one central place. Moreover, all orchestration between (complex) processes takes place within a single application. The drawback of a monolithic application is changing it. It often requires specialist knowledge, as do its maintenance and management, as well as knowledge of the history and structure of the monolith.
A monolith is also less scalable, and peak moments are harder to absorb. A monolith is scalable within its available hardware and can distribute the requested load over the available CPU and memory. By comparison, a microservice can scale beyond the limits of the machine it runs on, which makes the scalability of a microservice many times more flexible.
Curious how WeAreFrank! has been helping the largest insurer in the Netherlands for 20 years with the integration of hundreds of applications?
When you split an application into small pieces of independent 'services', you get microservices. That does not make them small services by definition. That one piece becomes a microservice precisely because it owns a process and the associated data, for example sending an invoice or processing an order request. Your IT environment no longer consists of a set of applications, but is divided down to the smallest level: separate components that really have only one function.
The big advantage of microservices is scalability. When you want to scale up, you no longer need to load your whole server; only the heavily requested components are scaled up. Within an application this often happens too, but within certain limits. Microservices run on a container platform, a kind of virtualization of your server. That lets you scale up and down quickly when needed. Because of the looser structure of microservices, components are easy to replace or adapt, but a lot of attention is needed to make sure no unwanted side effects occur in other components of the 'virtual application'.
The tricky thing about microservices is discovering how the different components work together. An example: within HR you deal with payslips, employees, addresses and salary tables. If an address changes, that can have consequences for the travel expense allowance. In a monolith that is a logical consequence, but with microservices it is a different story. You need a good picture of how everything fits together when you set up your IT infrastructure with microservices.
We are not saying microservices are better than a monolithic application, or the other way around. Both have their pros and cons. Before you make a choice, it is wise to think about where you want to put the priorities as a company. Do you really need the flexibility of scaling up for your business model? That comes with a considerable price tag. Is your organization suited to building and managing the complex microservice landscape? And does the current IT infrastructure meet your vision of the future? To find answers to these questions, it helps in any case to draw up a blueprint of your IT environment and talk to an integration specialist.
Then read our customer case, in which we show how we have been helping the largest insurer in the Netherlands for 20 years with the integration of hundreds of applications.