In 2021, Statista asked 950 organizations from all over the world for their opinion about microservices. Turns out, 85% of enterprises with over 5,000 employees use them already. 14% more are planning future adoption. This research suggests that larger businesses are more likely to see the value and become early adopters of microservices.
Smaller businesses can also massively benefit by transitioning from a monolithic architecture to microservices. Here’s a case in point from the MindK vault.
Why move to microservices: lessons from the frontlines
CEMAsys is one of the leading players in the corporate social responsibility (CSR) niche. It has been helping companies mitigate climate change since 2007. Yet, what worked as a small Norwegian consultancy couldn’t scale efficiently.
CEMAsys sustainability reporting software, developed by MindK [explore the case]
In 2013, our development team sat down with CEMAsys consultants to brainstorm how to transition to a SaaS model. Together, we designed a convenient web interface to deal with the CSR requirements:
- Radically simplified data entry.
- Secure document management library.
- Automated carbon footprint calculations.
- Advanced Health, Safety, and Environmental reporting.
- Powerful analytics.
- Supply chain management, and more.
Originally, the team went for a monolithic architecture with the Joomla core and Symfony login. Although the app had many functional components, all fit into just one deliverable. The whole codebase was inseparable and had to be deployed at once.
Such an approach allows a high development speed, especially early on. This is attractive for companies operating on tight budgets. Yet, monoliths have many drawbacks for larger applications. Based on our experience, here are some of the signs you need to abandon your monolith:
- Development speed grinds to a halt as you have to run the whole codebase through your CI/CD pipeline with each small change.
- A need to scale parts of your system independently, which is pretty much impossible with your current architecture.
- Introducing new technologies requires lengthy workarounds. As a result, it gets harder to maintain your application.
- When too many people try to use the admin panel, the entire application becomes unresponsive for all other users.
- Different parts of your software depend on each other and nobody seems to know how or why. Your junior QA engineer tried to find the answer. Nobody has seen her for the past three months.
As the CEMAsys project evolved, the old architecture and tech stack became its major limitations. The company grew and expanded into the global markets. It acquired new clients, including some Forbes Global 2000 companies. This necessitated building new features. Yet each new tweak could potentially break an unrelated functionality. Onboarding developers took a lot of time as they had to understand heaps of old code.
Minor changes could result in major bugs, so maintaining high quality standards required a lengthy QA process. There were other technological limitations. For example, new CO2 footprint calculations required reports with a huge amount of data. PHP simply failed to process this data before the timeout. Switching to a Node.js backend would’ve easily solved this problem.
Our team suggested breaking the core system into smaller modules with independent logic. In this microservice approach, each module performs just one business function. They can be developed by different teams, each using the technology that’s best suited for the task.
Microservice architecture in CEMAsys application
So, what benefits can you achieve by moving to microservices?
#1: Faster development
Migrating legacy applications to microservices gives a huge boost to the development speed. The client now has engineers working simultaneously on four different modules. These teams don’t interfere with each other. You don’t have to worry about deploying a change to the EU Taxonomy module breaking something in the CO2 footprint calculations. This simplifies the QA and debugging.
#2: Better scalability
Initially, the project was hosted on a single virtual machine. As the system grew, it became less stable and more expensive to operate. To solve this issue, the team placed each microservice in isolated containers. Using orchestration with a Kubernetes cluster improved system stability and the release speed. And with autoscaling in place, our operational costs were finally under control.
#3: Easier integrations
Each microservice has its own database, customized for the task at hand. These modules communicate with the help of an API gateway. This simplifies third-party integrations. Encapsulation allows changing one module for another without causing problems to the codebase. It also opens up new-use cases and revenue streams when you embed these modules in partner software.
#4: Improved performance and system stability
With microservice transformation the client can introduce new features or update services in the background without disrupting the user experience. Another improvement came from describing the entire infrastructure as code with the help of Terraform. This prevents undocumented changes, making the system much more stable and predictable.
All of this helped CEMAsys acquire more than 800 corporate clients. The company is now expanding into the American market. The microservice architecture allows us to quickly roll out new features and react to changes in local ESG legislation.
Many organizations choose a monolithic architecture to save costs and increase development speed. Yet at some point, they hit a wall in productivity. This is why a move to microservices makes a lot of sense for larger projects. The benefits of microservices range from faster development to easier QA, better scalability, and performance. Ultimately, this results in a better experience for your customers.
Microservices are a key part of a cloud-native approach we practice at MindK for the past five years. We’ve previously written about the skills to look for when you hire SaaS and microservices developers. So don’t hesitate to drop us a line if you want an expert team to modernize your software.