When are microservices right for your organization and its projects? As microservices increase in popularity – analysts Technavio recently published a report stating the cloud microservices market would grow at a compound annual growth rate of 25.1% from 2021 to 2026 – businesses and developers need a clear understanding of what microservices are, when they should be used and when a different model is appropriate.
Global technology researchers Gartner defines a microservice as “an application component that is tightly scoped, strongly encapsulated, loosely coupled, independently deployable and independently scalable” while Atlassian describes a microservice as a web service responsible for one piece of domain logic.
“Multiple microservices combine to create an application, with each providing a piece of functionality for a domain,” the software company says. “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.”
Microservices help drive the continuous delivery element of DevOps – practices that combine software development and operations to reduce development lifecycles – and complement Agile development methodologies. However, Gartner cautions that, “while a microservices architecture can deliver great benefits … success is often elusive due to misconceptions about why, when and how to use it.”
Used in the correct circumstances, microservices can deliver a range of benefits to developers and organizations.
Cisco business App Dynamics notes that because a microservices architecture delivers the ability to manage architectural components as independent services, building and maintaining complex applications becomes easier as small teams can break up tasks and work on pieces of infrastructure simultaneously. Furthermore, the vendor adds, the isolation of modular components through microservices makes it easier to address the root cause of performance issues, while updates can be rolled back and changes made without compromising the availability of an application.
Finally, the individual nature of microservices means they can be written in different languages, allowing DevOps teams to select the best tech stack for each module, while each modular unit can be scaled independently. Atlassian points to accountability as a benefit, pointing out that the separation of business concerns into independent microservices means the service team that owns a service focuses on the completed quality deliverable.
However, while microservices can unleash development productivity and agility, they can also present a range of challenges.
Atlassian points to the fact that moving from a traditional monolithic application architecture – in which an application is self-contained and independent from other applications – can increase complexity and the requirement for visibility into how components relate, who owns a component and the impact of activities on dependent components. “If a sprawl is left unmanaged, it results in slower development and poor operational performance,” Atlassian says, noting an experienced operations team is needed to manage architectural changes and constant redeployments.
Complexity issues can also impact the debugging of applications incorporating multiple microservices. Further, insight into information about components – including owners, resources and relationships – can be difficult to manage, as can communication and coordination between the teams and individuals involved. Microservices also come at a cost, and Atlassian notes that “each new microservice added to production deployment comes with its own costs of test suites, deployment playbooks, hosting infrastructure, monitoring tools, and more.”
When should organizations turn to microservices? A contributor to Gartner says software engineering leaders need to answer three essential questions before choosing microservices – when, why and how. “The ideal answer to “why” will result in a business case with a clear return-on-investment benefit,” Laura Starita says. “Software engineers most frequently adopt microservices architecture to enable continuous delivery of new application features. In fact, if you aren’t trying to implement a continuous delivery practice, you are better off using a more coarse-grained architectural model — what Gartner calls ‘Mesh App and Service Architecture’ and ‘miniservices’.
Mesh App and Service Architecture (MASA) is a model and solution design that links mobile, desktop, web and Internet of Things applications and associated data into a mesh of back-end services, while miniservices differ from microservices in the fact that each service may share data, whereas microservices are isolated from each other.
Starita argues software development teams should adopt microservices when other approaches – including miniservices, agile DevOps and continuous delivery practices – fail to meet software engineering cadence goals, and, to answer the ‘how’ of microservices deployment, tailor team structures and responsibilities, operating models, knowledge and application of distributed computing architecture patterns and agile and DevOps adoption to ensure success.
“Team structures should be aligned to the same business domains as the microservices to allow a single, cross-functional team to take responsibility for the full set of business capabilities and work autonomously to deliver to them,” she says. “This team structure functions best with a product-oriented operating model, whereby engineering teams have the authority to make product decisions and are measured based on their ability to deliver business outcomes.
“Success requires team members to be skilled in agile and DevOps practices, and have knowledge of a variety of distributed computing architecture patterns.”
Open source microservices technologies can help developers and organizations unleash the rich potential of a microservices architecture, and the right platform can help an organization manage critical tasks such as service registration and discovery, configuration management, gateway connection, and service governance. Service registration and discovery ensures an organization can track each microservice instance in use in an application and is updated as new services are added or removed, while microservice configuration management tracks changes to microservices and consuming applications over a period of time. A gateway connection enables the redirection and routing of requests to internal microservices endpoints, while service governance ensures appropriate policies, standards, best practices and guidelines are applied to microservice deployment.
Alibaba Cloud Microservices Engine incorporates a registration and configuration center that is fully managed and compatible with Nacos, ZooKeeper, or Eureka, while its gateways are built based on Istio and are compatible with the Kubernetes Ingress standard. Microservices Engine also provides enhanced service governance based on open source microservices frameworks such as Spring Cloud and Apache Dubbo in a non-intrusive manner.
With Alibaba Cloud Microservices Engine, and a clear view of when microservices are the right option, an organization can position itself to reap the benefits of continuous delivery and DevOps.
Alibaba Cloud Community - April 15, 2022
Alibaba Clouder - January 4, 2021
Alibaba Container Service - March 10, 2020
Alibaba Cloud Native Community - March 2, 2023
ProsperLabs - May 10, 2023
Alibaba Clouder - August 8, 2019
MSE provides a fully managed registration and configuration center, and gateway and microservices governance capabilities.Learn More
Accelerate software development and delivery by integrating DevOps with the cloudLearn More
An enterprise-level continuous delivery tool.Learn More
Offline SDKs for visual production, such as image segmentation, video segmentation, and character recognition, based on deep learning technologies developed by Alibaba Cloud.Learn More
More Posts by Iain Ferguson