Close

Microservices: understanding what it is and its benefits

Not very long ago, the preferred method of building software applications was a monolithic architecture, which was as a single, autonomous unit. This approach worked well for many developers until applications increased in complexity. When a modification to a small section of code is made in a monolithic system, it requires rebuilding the entire system, running tests on the entire system, and deploying an entirely new version of the application.

Then along came microservices, an approach that breaks down software systems into smaller units that are autonomously developed and deployed. The microservices architecture was driven by the DevOps movement that seeks to frequently deliver updates, like new features, bug fixes, and security improvements. It also became, in many instances, a path for businesses to rewrite legacy applications using modern programming languages and updates to a technology stack.

Microservices are a collection of small units that continuously deliver and deploy large, complex applications.

What are microservices?


A microservices architecture, also simply known as “microservices”, is an approach to building an application as a series of independently deployable services that are decentralized and autonomously developed. These services are loosely coupled, independently deployable, and easily maintainable. While a monolithic application is built as a single, indivisible unit, microservices break that unit down into a collection of independent units that contribute to the larger whole. Microservices are an integral part of DevOps, since they are the basis for continuous delivery practices that allow teams to adapt quickly to user requirements.

Microservices illustration

A microservice is a web service that is responsible for one piece of domain logic. Multiple microservices combine to create an application, with each providing a piece of functionality for a domain. Microservices interact with each other using APIs, like REST or gRPC, but don’t have knowledge of the internal workings of the other services. This harmonious interaction between microservices is a microservice architecture.

With a microservices architecture, developers can organize in smaller teams specializing in different services, with different stacks and decoupled deployments. For example, Jira is powered by multiple microservices, each providing specific capabilities, including searching issues, viewing issue details, comments, issue transitions, and more.

Characteristics of microservices


There is no formal definition of a microservices architecture, but there are some common patterns or characteristics that are important to know.

In a microservices architecture, each component can be developed, deployed, operated, changed, and redeployed without compromising the function of other services or an application’s integrity.

Benefits of microservices


Microservices provide many advantages. They simplify development and project management. Sometimes, they may eliminate the need for separate operations teams since developers can handle operations for the microservices they build. 

Some other benefits of microservices include:

Weighing scale illustration

Flexible scaling

Since microservices are distributed by design and can be deployed in clusters, they enable dynamic horizontal scaling across service boundaries. If a microservice reaches its load capacity, new instances of that service can rapidly be deployed to the accompanying cluster to help relieve pressure.

Agile illustration

Agility

Since small, independent teams typically build out a service within microservices, it encourages teams to adopt agile practices. Teams are empowered to work independently and move quickly, which shortens development cycle times.

Toolbox illustration

Technology flexibility

Microservice architectures don’t necessarily follow a set approach with one toolchain but allow teams the freedom to select the tools they desire.

Stacking blocks illustration

Frequent releases

One of the primary advantages of microservices is frequent and faster release cycles. As a key element of continuous integration and continuous delivery (CI/CD), microservices allow teams to experiment with new features and roll back if something doesn’t work. This makes it easier to update code and accelerates time-to-market for new features.

Challenges of microservices


Microservices-based architecture has many benefits, but it also comes with challenges. 

One challenge of microservices is that the independent services generate their logs. This is a disadvantage compared to monoliths' centralized logs, which provide a single source of truth for developers and operations teams. Monitoring and infrastructure management are also more complicated since many moving pieces exist. Testing and debugging are challenging because, unlike monoliths, no integrated development environment (IDE) exists.

Atlassian's Compass can help with all these challenges. Compass facilitates collaboration and allows companies to manage the complexities of distributed architectures as they scale. It does this by bringing the disconnected information together in a central, searchable location.

Development sprawl

The move from a monolith to microservices means more complexity. There are more services in more places created by multiple teams. This makes it challenging to see how different components relate to each other, who owns a particular component, and how to avoid causing a negative impact on dependent components. If sprawl is left unmanaged, it results in slower development speed and poor operational performance. As a system grows, it requires an experienced operations team to manage constant redeployments and frequent changes in the architecture.

Lack of clear ownership

A microservices architecture adds confusion to who owns what. A DevOps team may run a combination of APIs, component libraries, monitoring tools, and Docker images for users to deploy an application. It’s important to have insight into information about components, including their owners, resources, and evolving relationships between other components. Precise communication and coordination is required between numerous teams so that everyone involved can easily find the required knowledge to understand a product.

Exponential infrastructure costs

Each new microservice added to production deployment comes with its own cost of test suite, deployment playbooks, hosting infrastructure, monitoring tools, and more.

Added organizational overhead

An added level of communication and collaboration is needed to coordinate updates and interfaces between microservice architecture teams.

Debugging

It can be challenging to debug an application that contains multiple microservices, each with its own set of logs. A single business process can run across multiple machines at different times, which further compounds debugging.

Incident response

It’s important to have microservice incident response intelligence that includes information such as who is using the microservice, where the microservice was deployed, how the microservice was deployed, and who to contact when things go wrong.

Microservices and DevOps: Two peas in a pod


Given the increase in complexity and dependencies of microservices, the DevOps practices of deployment, monitoring, and lifecycle automation are seen as integral to microservices architectures. That’s why microservices are often considered the first step to embracing a DevOps culture, which enables:

  • Automation
  • Improved scalability
  • Manageability
  • Agility
  • Faster delivery and deployment

Key technologies and tools for a microservices architecture


A container is simply the packaging of an application and all its dependencies, which allows it to be deployed easily and consistently. Because containers don’t have the overhead of their own operating system, they are smaller and lighter-weight than traditional virtual machines. They can spin up and down more quickly, making them a perfect match for the smaller services found within microservices architectures.

With the proliferation of services and containers, orchestrating and managing large groups of containers is essential. Docker is a popular containerization platform and runtime that helps developers build, deploy and run containers. However, running and managing containers at scale is a challenge with Docker alone. Kubernetes and other solutions like Docker Swarm, Mesos, HashiCorp Nomad, and more help to address containerization at scale.

Containerization and the deployment of containers is a new pattern of distributed infrastructure. Docker and Kubernetes package a service into a complete container that can be rapidly deployed and discarded. These infrastructure tools are complementary to the microservices architecture. Microservices can be containerized, easily deployed, and managed using a container management system.

What are microservices?


A microservices architecture, also simply known as “microservices”, is an approach to building an application as a series of independently deployable services that are decentralized and autonomously developed. These services are loosely coupled, independently deployable, and easily maintainable. While a monolithic application is built as a single, indivisible unit, microservices break that unit down into a collection of independent units that contribute to the larger whole. Microservices are an integral part of DevOps, since they are the basis for continuous delivery practices that allow teams to adapt quickly to user requirements.

Microservices illustration

A microservice is a web service that is responsible for one piece of domain logic. Multiple microservices combine to create an application, with each providing a piece of functionality for a domain. Microservices interact with each other using APIs, like REST or gRPC, but don’t have knowledge of the internal workings of the other services. This harmonious interaction between microservices is a microservice architecture.

With a microservices architecture, developers can organize in smaller teams specializing in different services, with different stacks and decoupled deployments. For example, Jira is powered by multiple microservices, each providing specific capabilities, including searching issues, viewing issue details, comments, issue transitions, and more.

Future of microservices


What tools do people commonly use in microservices?

Businesses often use containerization tools such as Kubernetes and Docker. They also frequently use API gateways between microservices and their clients. These gateways perform API traffic functions such as authentication, access control, and load balancing.

How do microservices differ from monolithic architecture?

Monoliths are large codebases that function as one system. They require system downtime for updates and debugging. Microservices architectures are distributed applications with smaller, independent chunks of functionality. Developers can upgrade, improve, and debug these modules without taking the entire application offline. This simplifies scaling and aids development velocity.

How do microservices impact DevOps?

Those who understand DevOps know that continuous integration and continuous delivery (the DevOps CI/CD pipeline) are the mainstays of DevOps methodologies. The modular nature of microservices aligns perfectly with this approach. Microservices empower developers to swiftly create, test, and deploy small, frequent releases.

Join the Atlassian Community for more microservices articles and discussions.

Navigate your microservices with Compass

When working with a microservices architecture, Atlassian’s Compass manages the complexity of a distributed architecture that scales. It’s an extensible developer experience platform that brings disconnected information about engineering output and team collaboration together in a central, searchable location. In addition to helping you tame your microservice sprawl with the Component Catalog, Compass can help you establish best practices and measure the health of your software with Scorecards and provide you with data and insights across your DevOps toolchain using extensions built on the Atlassian Forge platform.

Compass microservices illustration