Why microservices matter in modern commerce

Table of Contents

Breaking up the monolith: Why microservices matter in modern commerce

M
Mike Sharp
Chief Product Officer, commercetools
Published 26 June 2023
Estimated reading time minutes

In a world where businesses span continents and omnichannel preferences grow at a breakneck pace, the monolithic architecture behind a lot of digital commerce is showing its cracks. So, how can tech experts meet this challenge? It’s time to break up the monolith with microservices, a modern software development paradigm in which an application is broken down into a collection of small, independent services. The result: You can break free from rigid legacy platforms, embrace agility and empower your tech teams to achieve more in less time. 

Why microservices matter in modern commerce

Why microservices-based architecture is growing

We are witnessing a transformative phase in the realm of commerce, driven by the rising expectations of consumers who seek seamless transactions anytime and anywhere. Omnichannel is on the rise, and so is the use of AI, the expansion to new business models and “phygital” experiences. Reacting quickly to these changes is a must for businesses across the board, but how can this be achieved with rigid monolithic commerce platforms? 

What many companies have experienced is that embracing a microservices-based architecture is key to meeting their requirements for scalability, agility and flexibility — and powering the global, omnichannel and AI-powered future in the years to come. In fact, 85% of enterprise businesses and between 75% to 84% of mid-sized businesses already use microservices. Plus, a staggering 94% of tech pros consider microservices extremely or very important for the products they deliver. Leading companies such as Netflix, Uber, Etsy and Amazon have long recognized the advantages that microservices offer, especially in digital commerce. 

In this blog post, let’s take a deeper look into the concept of monoliths, highlight the benefits of microservices, examine successful implementations, and discuss the challenges and considerations involved in adopting microservices in modern commerce.

Understanding the monolith

Monolithic platforms, also known as legacy platforms or all-in-one suites, refer to integrated systems that offer a pre-packaged software stack. In commerce, they typically provide generic eCommerce components and classic commerce features within a tightly coupled system. Monolithic platforms have traditionally dominated the landscape since digital commerce came to life in the early 1990s and were successful in enabling desktop-only eCommerce. 

(Fun fact: The term “monolith” draws inspiration from ancient structures like temples carved from a single massive stone, representing software architecture built as a single atomic unit.) 

As you already know, the world has moved beyond desktop-only eCommerce, and now encompasses a myriad of channels, locales and so on. In such complex scenarios, limitations to the monolithic approach become evident:

  • Due to the tightly integrated nature of these legacy platforms, making changes or performing customizations is a significant challenge. Over time, the system becomes too bulky, so it’s harder to maintain or update it, leading to data silos and inefficiencies.

  • Performing any change is risky and, let’s be honest, a Herculean task. Every time a new update is queued, you need to plan it meticulously, your team is on call — and still it may translate into downtime and disruption to business operations.

  • Monolithic systems often struggle to handle high traffic influxes or high SKU processing times, so slowdowns and downtime are common. 

  • Innovation is so hard to accomplish! After all, developers are busy maintaining the system and fixing bugs. 

  • The cost of legacy platforms is more than a licensing fee or the cost of integrations. Add the cost of upgrades, maintenance and the (often hidden) cost of technical debt. If you’re keeping track of these costs in a multi-year journey, you’ll notice that the real total costs of ownership (TCO) of your legacy platform are much higher than initially thought.


Has your team experienced any of these challenges over the past years? If yes, it’s time to consider microservices indeed. 

Responding faster to constant change: Microservices

Microservices are the antithesis of monolithic architectures, breaking down the application into a collection of small, independent services that can be developed, deployed and scaled independently. It’s common that each microservice has its own dedicated database and focuses on a specific business capability. Also, microservices communicate with other services through well-defined interfaces, such as APIs or asynchronous messaging mechanisms.

Why each microservice should own its data
Each microservice should exclusively own its data.
Why microservices shouldn’t share data
Don't share data across microservices; use application-level APIs to exchange data.

In a nutshell, each microservice is assigned a specific role in handling distinct functionalities. For instance, the “Inventory” microservice takes charge of managing product availability to ensure accurate stock information. “Shopping Cart” is responsible for monitoring and maintaining each user’s individual shopping cart, enabling a seamless and personalized shopping experience. “Checkout” handles the task of placing orders based on the items stored in the shopping cart, streamlining the purchasing process. 

Here’s the thing: Dividing functionalities into separate microservices enables your eCommerce to become more modular, allowing each service to operate independently while seamlessly communicating and collaborating with other services. This approach enhances scalability, maintainability and flexibility across the commerce infrastructure, and enables businesses to become better adaptable to constant change. 

How do microservices fit in with composable commerce and PBCs?

Before we dive deeper into the many benefits of microservices, let’s first answer a burning question: Are microservices related to composable commerce?  

The rise of composable commerce (or any composable system) is rooted in the combination of various technologies, such as APIs, headless, cloud-native infrastructure and, naturally, microservices. This approach, long known as MACH® technology, is the technical backbone of composable commerce. 

Composable commerce, a term coined by market analyst Gartner® in 2020, is defined as a development approach enabling businesses to “leverage packaged business capabilities (PBCs) to move toward future-proof commerce.” PBCs are, in short, applications or services developed around a particular business function, usually grouping multiple microservices to address a specific business capability. 

How packaged business capabilities (PBCs) and microservices compare

In a nutshell, PBCs are an efficient way to organize your microservices based on your business needs, simplifying operations without jeopardizing flexibility.   

What are the benefits of a microservices-based architecture for commerce?

Microservices-based architecture provides numerous advantages for software development teams tasked with building eCommerce systems. Let's delve into a few key benefits.

Flexibility and adaptability

Unlike monolithic architectures, which rely on a single technology stack, microservices allow for optimal performance and efficiency by leveraging appropriate tools and technologies for each microservice. 

Additionally, the independence provided by microservices enables easy modification of the technology stack for individual microservices without disrupting others. This empowers development teams to adopt new technologies, frameworks or languages as needed, continuously refining and optimizing microservices without compromising system stability. The result is an adaptable and scalable commerce system.

Scalability 

With microservices, each service can be scaled independently based on its specific demand, allowing for efficient resource utilization and optimal performance. This enables organizations to handle varying workloads and rapidly respond to changes in user demand. For instance, if a blog post on your eCommerce site becomes immensely popular, resulting in a sudden surge in traffic, you can scale up the specific microservice responsible for managing the blog without affecting the entire system. In situations where a particular microservice experiences slowdowns or increased workload, you can easily add more instances of that specific service to handle the influx of traffic effectively.

Independent deployments and faster releases 

You can deploy changes to individual microservices independently without the need to redeploy the entire eCommerce system or coordinate extensively with multiple development teams. This independent deployability empowers you to deliver new features or resolve issues in specific services. In short, you can streamline development and deployment cycles, ensuring efficient and agile updates to your eCommerce system, plus improve fault isolation. 

Empowered teams and ownership 

The decision to switch from a monolithic commerce platform to flexible microservices not only affects an organization’s digital output but also requires structural changes to teams and hierarchies. While large monolithic applications often require around 100 or more backend developers, microservices require small teams of between two to 15 people to develop, deploy and manage a single microservice through its entire life cycle. Each team should have a wide mix of skills and roles including business, operations and developers. A couple of advantages of creating these small teams include: 

  • Fewer communication pathways (less chance for error or confusion).

  • More autonomy when it comes to choosing the technology best suited for solving each business problem.

  • The right architectural and implementation decisions apply solely to each team’s microservice.

Leading businesses that have implemented microservices

Many brands, from Netflix and Amazon to Uber and Zalando, have had their share of epic failures with monolithic applications, which triggered the move to microservices-based architectures. 

For instance, Netflix realized that a monolithic architecture isn’t the right answer to a complex application when a single mistake caused a massive data corruption that led to days of downtime. The streaming giant's architects decided to move the entire application to AWS cloud-based microservices, so its services could be available 24/7, work fast and scale without hassle. 

Similarly, a monolithic approach wasn’t able to handle Amazon’s meteoric growth from a small bookstore to the world’s largest eCommerce marketplace. In the beginning, the company was built as a two-tier monolithic app, but the system started to crack with deployments taking way too long, vast databases to manage, adding new features was risky and so on. 

The need for a flexible architecture led to microservices, so Amazon could automate operational processes and scale services dynamically based on traffic and business requirements. This shift also facilitated the adoption of a continuous integration/delivery (CI/CD) approach, enabling faster development and more flexible deployments.

Amazon would not exist without microservices. Of course, our customers don’t have to be online giants like Amazon. From Austrian online ski rentals to full-range bookstores with 14 million books in the cloud – microservices make companies of all sizes flexible and agile.
Dirk Hoerig

CEO and Co-founder, commercetools

Dirk Hörig Headshot

Today, microservices-based architecture has picked up steam across industries, business models and company sizes, with a large number of brands in B2C and B2B adopting it for increased scalability, flexibility and agility. 

Kmart, a discount department store in Australia and New Zealand, implemented a hybrid microservices architecture and serverless capabilities to meet the increasing demand for online shopping. 

As an iconic Australian retailer recognized for its service and convenience, Kmart’s combination of headless and microservices will provide it with a significant competitive advantage in the local retail market.
Vicki Miller

GM of Digital Technology, Kmart

Kmart logo

Another great example is the popular fashion label Express. The retailer needed a new commerce architecture that facilitated the development of innovative solutions and could adapt to consumer behavior and their changing buying needs. With microservices, Express accelerated the pace of innovation without disruption to its systems or the customer experience. 

The commercetools microservices, API-based, headless approach makes us faster. We went from releasing updates every 2 to 3 months to multiple releases a week. This helps us meet the needs of the business and keep up with market demands.
Brendan Gualdoni

VP of Enterprise Architecture, Commerce and Integration, Express

Express logo

4 considerations before a monolith-to-microservices migration

Now that you know about the many benefits of microservices, what should you consider when starting a potential implementation? Adopting microservices requires consideration of various factors:

  1. Organizational changes: The transition from a monolithic mindset to a microservices-oriented approach often involves decentralized decision-making, the formation of cross-functional teams and the need for effective communication and collaboration between teams. Dive deeper into an organizational structure and culture that matches this shift. 

  2. Testing and deployment strategies: As the system becomes distributed, testing and deployment strategies must be adapted accordingly. Implementing comprehensive automated testing frameworks and establishing robust deployment pipelines are crucial to ensure the reliability and stability of the entire system.

  3. Security and data management: With microservices, the number of communication channels between services increases, making security a critical concern. Implementing proper authentication, authorization and encryption measures is essential to protect sensitive data and prevent unauthorized access.

  4. Monitoring: Implementing centralized logging, distributed tracing and performance monitoring tools is necessary to gain insights into the health and performance of the entire system, as well as individual microservices.

How to incrementally adopt microservices

If your business has reached a tipping point in using a monolithic platform, adopting microservices can be done incrementally and with low risk by using the strangler pattern. This approach breaks the legacy commerce platform into small pieces as microservices and slowly replaces single components step by step. Over time, the monolith will “suffocate” and eventually disappear. 

The strangler pattern in action

More than migrating from a monolith application to microservices, the strangler pattern reduces complexity with an automated CI/CD (continuous integration and continuous delivery) pipeline for each microservice, so you can deliver business value faster than a traditional big bang/greenfield approach.  

Microservices for macro results

By breaking down monoliths into smaller, independent services, organizations can unlock improved scalability, flexibility, maintainability and faster development cycles, which can work wonders for your business, just like it did for Netflix, Amazon, Kmart and Express. While challenges exist, with proper planning, organizational alignment and technological considerations, adopting microservices can revolutionize software development and pave the way for future innovation and growth.

Are you eager to dive deeper into the topic? Download the eBook Microservices for Modern Commerce by our Chief Strategy Officer, Kelly Goestch, and get more tech insights on microservices. 

M
Mike Sharp
Chief Product Officer, commercetools

He’s a believer in, and builder of, whole product experiences and world-class product teams — strategically envisioning what people want to use and will rush to buy. He also absolutely loves a challenge.

Related Blog Posts