1-888-310-4540 (main) / 1-888-707-6150 (support) info@spkaa.com
Select Page

Top 4 Pros and Cons of Microservices Architecture

In the ever-expanding world of software engineering buzzwords, “microservices” are a fairly recent addition. Introduced around 2012, it has steadily gained in popularity. But what are microservices and what are the pros and cons of adopting them?

At its most basic level, the term “microservices” denotes a style of software architecture with applications broken out into smaller autonomous services. The opposite would be “monolithic” application architecture, characterized by a single service or process handling all application responsibilities. Microservices are based on the idea of “service-oriented architecture” (SOA), but with very focused and fine-grained services as well as lightweight and simple communication. It takes the programming concept of breaking out functionality into different classes or libraries and moves that to the service level.

As an illustration, suppose you have a web application for your local library allowing users to browse the book catalog, see upcoming events hosted at the library, and view the history of the books they’ve checked out. A monolithic architecture would be characterized by a single WAR or EAR file (for instance) deployed to an application server and interfacing with one or more databases. A microservices architecture divides up various responsibilities into multiple WAR or EAR files, deployed individually, either to the same application server or across different servers. For example, one service to provide the data for the book catalog, one for providing the library’s calendar information, one to provide user account information, and another to process checkouts and renewals. These independent services contribute their portion of the data to the main process but potentially run on different machines.

Top Advantages

  1. INDEPENDENT – An advantage to a microservices architecture is that each service is developed and deployed independently from all the other services. This means an update to any one component does not require the entire application to come down in order to deploy that update, only the component in question. This allows for improved uptime and safer deployment processes.
  2. TARGETED – Similarly, just as services are developed independently, a microservices architecture makes it easier for different portions of an application to be implemented using different languages. This is desirable when a particular language is better suited or targeted at a given task.
  3. FLEXIBLE – Since all communication happens over the network instead of within the same in-memory process, there is more flexibility in terms of how each endpoint is composed. This also makes it easier for teams that have different skill sets to contribute to a project without spending time learning a new language or operating outside of their areas of expertise.
  4. ROBUST – Applications using microservices architecture are more robust as a whole.  When there is a loose coupling between services, if any service fails, there’s a greater chance the application as a whole can continue to provide value to users. The robustness depends on the nature of the services, how they interact and whether the application is designed with fault-tolerance.

Top Disadvantages

  1. REFACTORING – Certainly, if the various behaviors of your application are well understood and easily separated, a microservices architecture can provide some additional benefits. But suppose a project has been implemented in this style but the proper relationship between components was initially misunderstood? Refactoring an application across multiple services is much harder than refactoring a monolith and any interface changes will need to be coordinated between all the affected teams. Suddenly, using different languages for different components does not seem like such a benefit when functionality from one service has to be ported over to another.
  2. COMPLEXITY – As it was previously stated, splitting an application into multiple independent services generates more artifacts to manage with potentially diverse deployment processes. This can increase the complexity of deploying the entire application at once.
  3. TESTING – Spinning up test environments is more involved with microservices due to the increased number of nodes required. Tools such as Electric Flow make managing and tracking these artifacts and environments easier, but this issue can’t be ignored.
  4. PERFORMANCE – Another area potentially impacted is overall performance. Communication over a network is considerably slower than in memory. For many applications, this may be negligible, particularly as network speeds improve, but it’s clearly something that should be taken into consideration.

On a related note, the design of an application will need to be skewed towards asynchronous behavior. This is neither inherently good nor bad but represents a potential challenge if trying to convert the design of an existing application.

In conclusion, microservices represent an increasingly popular style of application architecture. From a DevOps standpoint, they are a mixed blessing due to the relative ease and reduced liability of deploying individual components coupled with the increased complexity of the managing a larger number of components that grow and change on varying schedules.

Next Steps:

David Hubbell
Senior Software Engineer
SPK and Associates

Latest White Papers

How CloudBees Uses Feature Management to Gain Competitive Advantage

How CloudBees Uses Feature Management to Gain Competitive Advantage

In this whitepaper, you’ll discover how CloudBees Feature Management Flags can help you gain a competitive advantage in the market.  Discover CloudBees Feature Management In this CloudBees Feature flag whitepaper, you’ll learn: How to increase your developer...

Related Resources

Salesforce Migrates DevOps to the Cloud with CloudBees CI

Salesforce Migrates DevOps to the Cloud with CloudBees CI

Industry:  Software Geography: Global Salesforce empowers software developers to create high-quality, secure enterprise apps on its Force.com platform by moving development operations to the cloud using CloudBees CI and Amazon EKS. Challenge: Migrate app development...

STRATTEC Security Corporation’s PTC Windchill PLM ROI Case Study

STRATTEC Security Corporation’s PTC Windchill PLM ROI Case Study

STRATTEC Security Corporation deployed PTC Windchill to replace its existing product lifecycle management (PLM) solution. Additionally, they wanted to improve product design tracking and collaboration. Nucleus found that PTC Windchill PLM enables increased...

Moving Code Corp to the Atlassian Cloud

Moving Code Corp to the Atlassian Cloud

Code Corp has around 250 users of their Atlassian suite and specializes in high-performance barcode readers and scanning software. This hardware and software provide data capture for many different industries and use cases. Additionally, they power track-and-trace...