DevOps.com

  • Latest
    • Articles
    • Features
    • Most Read
    • News
    • News Releases
  • Topics
    • AI
    • Continuous Delivery
    • Continuous Testing
    • Cloud
    • Culture
    • DevSecOps
    • Enterprise DevOps
    • Leadership Suite
    • DevOps Practice
    • ROELBOB
    • DevOps Toolbox
    • IT as Code
  • Videos/Podcasts
    • DevOps Chats
    • DevOps Unbound
  • Webinars
    • Upcoming
    • On-Demand Webinars
  • Library
  • Events
    • Upcoming Events
    • On-Demand Events
  • Sponsored Communities
    • AWS Community Hub
    • CloudBees
    • IT as Code
    • Rocket on DevOps.com
    • Traceable on DevOps.com
    • Quali on DevOps.com
  • Related Sites
    • Techstrong Group
    • Container Journal
    • Security Boulevard
    • Techstrong Research
    • DevOps Chat
    • DevOps Dozen
    • DevOps TV
    • Digital Anarchist
  • Media Kit
  • About
  • AI
  • Cloud
  • Continuous Delivery
  • Continuous Testing
  • DevSecOps
  • Leadership Suite
  • Practices
  • ROELBOB
  • Low-Code/No-Code
  • IT as Code
  • More
    • Application Performance Management/Monitoring
    • Culture
    • Enterprise DevOps

Home » Blogs » DevOps Practice » When Should You Go for Microservice Architecture?

When Should You Go for Microservice Architecture?

By: Karthikeyan Shanmugam on October 31, 2019 2 Comments

There is steady increase in the adoption of microservice architecture style since 2014 (Figure 1). Microservice architectural style structures an application as a collection of loosely coupled services that implement business capabilities.

Related Posts
  • When Should You Go for Microservice Architecture?
  • 4 big challenges of microservices
  • Using Event-Driven Architecture With Microservices
    Related Categories
  • Blogs
  • DevOps Practice
  • Enterprise DevOps
    Related Topics
  • application architecture
  • CD
  • continuous delivery
  • microservice architecture
  • microservices
Show more
Show less

An architecture style is a family of architectures that share certain characteristics. For example, N-tier is a common architecture style. Architecture styles generally don’t dictate the use of particular technologies, but some technologies are well-suited for certain architectures. For example, containers are well suited for microservice since they go hand-in-hand for the deployment.

DevOps Connect:DevSecOps @ RSAC 2022

In this article, you will learn about the typical considerations, challenges and benefits of the microservice architecture style.

Figure 1: Microservice Google Trends.

While microservice applications are built as a set of modular components, they are easier to understand, simpler to test and effortless to maintain over the life of the application. It enables organizations to achieve agility and be able to improve the time it takes to get working enhancements to production.

It also enables the continuous delivery/deployment of large, complex applications and the evolution of its technology stack. Having detailed out on the benefits side there are quite a bit of challenges as well, which we will discuss in the next section.

Constraints Imposed by Microservice Style

By adhering to the following constraints imposed by microservice architecture style, what we get is a system where services can be deployed independently, faults are isolated, frequent updates are possible and it’s easy to introduce new technologies into the application.

  • Each service represents a single responsibility.
  • Every service is independent of the others.
  • Each service needs its own JVM (or equivalent) so instances are isolated.
  • Data is private to the service that owns it.
  • Services do not share data and need to implement queries that need to retrieve data owned by multiple services.
  • Well defined mechanism to implement service-to-service communication and scheme to deal with partial failure.
  • Requests that span multiple services and require careful coordination between the teams.
  • Testing to cover the interactions between services.
  • Deploying and managing a system comprised of many different services.

Consider Challenges Versus Benefits

Each architectural constraint has its own associated challenges/benefits, so it’s important to understand and balance both. Before adopting any style of architecture, you have to ask yourself if the benefits outweigh the challenges for the application you are considering.

In the table below, we take a look at the benefits versus challenges of microservice style applications.

BenefitsChallenges
Enables the continuous delivery and deployment of large, complex applications.There is an additional complexity of creating a distributed system.
Improved maintainability: Each service is relatively small so it’s easier to understand and change.Implementing requests that span multiple services is more difficult.

Maintaining data consistency between service(s) is a challenge.

Better Testability: services are smaller and faster to test.Testing the interactions between services is more difficult.
Better deployability: services can be deployed independently.Increased operational and deployment complexity of deploying and managing a system comprised of many different services.
Each team can develop, test, deploy and scale their services independently of all of the other teams.Implementing requests that span multiple services requires careful coordination between the teams.
Improved fault isolation.Inter-service communication and dealing with partial failure implementation is challenging.
Eliminates long-term commitment to a technology stack.Overhead of multiple JVM runtimes (or equivalent) and increase in memory consumption needs to be taken care of.

Scenarios Where You Can Consider Going for Microservice

Consider an scenario where you are developing an enterprise application that must support the following characteristics:

  • Support for different variety of clients that includes desktop browsers, mobile browsers and native mobile applications.
  • Expose an API for third parties to consume.
  • Integration with other applications via web services or a message broker.
  • Run multiple instances of the application on multiple machines to fulfill scalability and availability NFR requirements.
  • Adopt emerging technology stack.
  • Planning to go for continuous deployment pipeline setup for the application.

From the requirements above, you can very well say the application is 100% fit for a microservices architecture.

You have to define an architecture that structures the application as a set of loosely coupled, collaborating services. Services can communicate using either synchronous or asynchronous protocols. Services can be developed and deployed independently of one another. Each service has its own database in order to be decoupled from other services.

Let’s look at some of the typical scenarios where you can consider going for microservice style of architecture:

  1. Monolithic application migration due to improvements needed in scalability, manageability, agility or speed of delivery.
  2. Re-platform a legacy application by transforming functions/modules to microservices.
  3. Rewriting legacy application to modern languages, technology stack to meet the demands of modern business.
  4. Individual cross-cutting services that are independent in nature. For example: encryption services, authentication services, etc.
  5. Independent business applications or services reused across multiple channels. For example, payment services, login services, flight search services, customer profile services, notification services, etc.
  6. Commonly used enterprise applications. For example, time tracking application.
  7. Scenarios where a service provider makes computing resources and infrastructure management available to the customer as needed. For example, forecasting services, price calculation services, prediction services, etc.
  8. Back-end services for responsive client-side web application where data could be coming from multiple channels or different data sources.
  9. Highly agile applications or applications demanding speed of delivery or time to market or innovation pilots, etc.
  10. Applications that got polyglot, multi-language, cloud application development.

Make the Choice

Before going for microservice architecture, make sure you know the challenges and benefits. Otherwise, your application design could end up with a design that fits the style but does not achieve its full potential. Adopt microservices only if you see enough value for your applications. Also note sometimes relaxing a constraint is better than insisting on architectural purity.

— Karthikeyan Shanmugam

Filed Under: Blogs, DevOps Practice, Enterprise DevOps Tagged With: application architecture, CD, continuous delivery, microservice architecture, microservices

Sponsored Content
Featured eBook
The Automated Enterprise

The Automated Enterprise

“The Automated Enterprise” e-book shows the important role IT automation plays in business today. Optimize resources and speed development with Red Hat® management solutions, powered by Red Hat Ansible® Automation. IT automation helps your business better serve your customers, so you can be successful as you: Optimize resources by automating ... Read More
« Harnessing the Power of Developers
CircleCI Achieves SOC 2 Compliance for DevOps Platform »

TechStrong TV – Live

Click full-screen to enable volume control
Watch latest episodes and shows

Upcoming Webinars

Continuous Deployment
Monday, July 11, 2022 - 1:00 pm EDT
Using External Tables to Store and Query Data on MinIO With SQL Server 2022
Tuesday, July 12, 2022 - 11:00 am EDT
Goldilocks and the 3 Levels of Cardinality: Getting it Just Right
Tuesday, July 12, 2022 - 1:00 pm EDT

Latest from DevOps.com

Rust in Linux 5.20 | Deepfake Hiring Fraud | IBM WFH ‘New Normal’
June 30, 2022 | Richi Jennings
Moving From Lift-and-Shift to Cloud-Native
June 30, 2022 | Alexander Gallagher
The Two Types of Code Vulnerabilities
June 30, 2022 | Casey Bisson
Common RDS Misconfigurations DevSecOps Teams Should Know
June 29, 2022 | Gad Rosenthal
Quick! Define DevSecOps: Let’s Call it Development Security
June 29, 2022 | Don Macvittie

Get The Top Stories of the Week

  • View DevOps.com Privacy Policy
  • This field is for validation purposes and should be left unchanged.

Download Free eBook

Hybrid Cloud Security 101
New call-to-action

Most Read on DevOps.com

Developer’s Guide to Web Application Security
June 24, 2022 | Anas Baig
What Is User Acceptance Testing and Why Is it so Important?
June 27, 2022 | Ron Stefanski
Chip-to-Cloud IoT: A Step Toward Web3
June 28, 2022 | Nahla Davies
DevOps Connect: DevSecOps — Building a Modern Cybersecurity ...
June 27, 2022 | Veronica Haggar
Rust in Linux 5.20 | Deepfake Hiring Fraud | IBM WFH ‘New No...
June 30, 2022 | Richi Jennings

On-Demand Webinars

DevOps.com Webinar ReplaysDevOps.com Webinar Replays
  • Home
  • About DevOps.com
  • Meet our Authors
  • Write for DevOps.com
  • Media Kit
  • Sponsor Info
  • Copyright
  • TOS
  • Privacy Policy

Powered by Techstrong Group, Inc.

© 2022 ·Techstrong Group, Inc.All rights reserved.