When not to use microservices: 4 challenges to consider | TechTarget (2024)

Tip

The switch from microservices to monolith could save costs and improve performance. Explore key considerations and questions to ask when deciding the right architecture for an app.

Microservices have defined the software development zeitgeist for the better part of a decade, but that doesn't make it the best choice.

For example, in March 2023, Amazon's Prime Video developers announced that a switch from microservices to a monolithic architecture for an audio/video monitoring service cut infrastructure costs by 90 percent.

Rather than assuming microservices are always the better choice for app building, application architects and developers must approach the microservices vs. monolith question with nuance, evaluating the microservices apps already in place and considering whether converting them to monoliths could result in better cost or performance outcomes.

With this reality in mind, here are four reasons why microservices don't always live up to the hype and questions to ask when determining whether microservices are the right option for an app.

The problems with microservices

Microservices can improve an application's reliability and capacity to scale. The codebases are more modular than a monolith, which can make some aspects of microservices development easier, and the failure of an individual microservice won't bring down the entire app.

But, microservices can present some real challenges and drawbacks, including a significant increase in application complexity and potential performance reductions.

1. Infrastructure overhead

The total resource consumption efficiency of a microservices application stack might be, in some cases, greater than that of a monolithic version of the same app. This can happen for a variety of reasons, such as redundant logic within microservices that have overlapping functionality or the need to deploy additional tools -- like container orchestrators and service meshes -- to manage microservices.

Monitoring microservices using the sidecar proxy approach can also increase overhead. Each microservice requires a monitoring agent, which is less efficient than deploying a single agent for an entire app. Depending on the design and deployment, microservices have the potential to help an application consume resources more efficiently, but they also have the potential to do exactly the opposite.

2. Development complexity

Codebases for microservices are modular, allowing developers to work on and make changes to individual microservices instead of an app's entire codebase.

Each microservice is typically compiled independently and then deployed into a testing environment alongside other microservices to evaluate the application as a whole. This can complicate development by creating more dependencies for developers to address within the app, which leads to more complex build and testing operations.

3. Operational complexity

Microservices introduce more moving parts to an app. There is more data to monitor and interpret and more places within the app for things to potentially go wrong. Additionally, microservice deployments often involve ancillary tools -- container orchestrators and service meshes -- not typically used with monoliths.

When not to use microservices: 4 challenges to consider | TechTarget (2)

4. Performance risks

The increased development and operational complexity of microservices might result in lower performance. A microservices app is likely to face performance issues if only one service depletes its resources despite others having capacity to spare. A monolith is less likely to encounter this type of issue because resources can be allocated to a single process rather than a collection of microservices.

It can also be easier for buggy code to slip into a microservices app without being detected during testing. Operations teams might struggle to identify and respond to performance problems quickly within a complex microservices app.

A checklist for deciding between microservices vs. monoliths

Microservices might come with its own set of unique challenges, but app developers and architects should weigh both the drawbacks and advantages of a microservices approach on a case-by-case basis.

Answering these key questions is the first step to making an informed, nuanced decision about whether a given app will work better as microservices or a monolith:

  • Where will the app be deployed? If an app is not going to run on distributed infrastructure, there is less to gain in using microservices.
  • How will the app be deployed? If a complex hosting stack is required to operate a microservices app, the resources consumed by ancillary tools might lead to lower overall levels of performance.
  • How will the app's functionality be broken down into microservices? If a distinct functionality can be assigned to each microservice without overlapping logic, microservices might be a better approach. If it's not clear exactly how to divide app functionality into a set of services, a monolith might be a better design.
  • Does the CI/CD pipeline support microservices well? If the CI/CD pipeline lacks the agility to manage the complexity of building and testing microservices, stick with a monolith.
  • How experienced is the team? If the architects, developers and operations engineers are well-versed in managing and optimizing microservices apps, the team will be in a stronger position to take advantage of a microservices approach.

Considering a microservices to monolith conversion? Consolidating the microservices into a shared codebase, removing redundant code and updating the build processes to support a monolith will require some effort, but the journey from microservices to monolith is likely to be much shorter and simpler than the reverse.

Chris Tozzi is a freelance writer, research adviser, and professor of IT and society who has previously worked as a journalist and Linux systems administrator.

Next Steps

Architecting beyond microservices and monoliths

Real benefits of microservices

Understanding the modular monolith and its ideal use cases

Related Resources

Dig Deeper on Enterprise architecture management

  • What are microservices? Everything you need to knowBy: StephenBigelow
  • Architecting beyond microservices and monolithsBy: MattHeusser
  • Three-tier vs. microservices architecture: How to chooseBy: ChrisTozzi
  • monolithic architectureBy: RahulAwati
When not to use microservices: 4 challenges to consider | TechTarget (2024)

FAQs

When not to use microservices: 4 challenges to consider | TechTarget? ›

In situations where a stable network, highly available software, and quick response times are critical, the microservices setup might cause problems. For these cases, choosing a Monolithic Architecture, where everything is bundled into one unit, could be a better option.

In which of these scenarios is microservices not a good choice? ›

In situations where a stable network, highly available software, and quick response times are critical, the microservices setup might cause problems. For these cases, choosing a Monolithic Architecture, where everything is bundled into one unit, could be a better option.

When might microservices be a bad idea? ›

Microservices experience a lot of latency, which worsens with Serverless or Functions as a Service designs. One implementation pattern that worsens this problem is when service-to-service calls span multiple availability zones. Reduce your latency time by keeping calls within the same availability zone.

Which one is the challenges faced while using microservices? ›

Duplication of efforts across implementation teams and an increased cost through multiple different technologies. Integrated testing is difficult when there are only separate microservice teams. Greater operation complexity through more moving parts, and more operational skills are required from your development team.

Which choice is a disadvantage when using a microservices architecture? ›

Disadvantages of microservices

Increased complexity: Because microservices are distributed, managing service communication can be challenging. Developers may have to write extra code to ensure smooth communication between modules.

When shouldn't you use microservices? ›

If you are working on a new startup or brand new product which require significant change when developing and iterating your product, then you should not start with microservices. This kind of projects which's are pivot domain models so much, this will become to changes across service boundaries is an expensive way.

In which you should not go for microservice? ›

A microservices app is likely to face performance issues if only one service depletes its resources despite others having capacity to spare. A monolith is less likely to encounter this type of issue because resources can be allocated to a single process rather than a collection of microservices.

What are the weakness of microservices? ›

Decreased performance. A big disadvantage of microservices is that they consume more memory, clock-cycles and network bandwidth than a comparable monolithic architecture. A monolithic application runs all of its components within the scope of a single process.

What is the downfall of microservices? ›

Disadvantage #1: Microservices Are More Complex

Microservices involve a lot more moving parts than traditional applications, requiring enormous effort, careful planning, and strategically applied automations to ensure communication, monitoring, testing, and deployment processes run smoothly.

What are not the advantages of microservices? ›

Despite many other strengths, microservices are limited in the ability to reuse code. Developers have to recreate code independently (or near-independent) from each service, which can consequently increase software development costs and time.

What happens when a microservice fails? ›

When a microservice encounters a failure, it can retry the operation after a certain delay or with an exponential backoff strategy. This can be particularly useful when the failure is due to temporary issues like network glitches or resource unavailability.

What are the common risk with a Microservice architecture? ›

In a microservices security architecture pattern, common risks and challenges include increased attack surface due to the distributed nature of services, potential vulnerabilities in communication between microservices, difficulty in enforcing consistent security policies across multiple services, and the complexity of ...

Why to avoid microservices? ›

Data Management Difficulties: Using separate microservices can make data management more difficult, as data can be distributed across services. This can lead to increased complexity in synchronizing and maintaining data.

When to use monolithic vs microservice? ›

For a small team with a simple app, a monolith architecture allows for faster development. For multiple teams working on requirements that may change, a microservices architecture allows parallel development and flexibility.

What is fault tolerance in microservices? ›

Microservice-based applications are resilient when they can continue operating if there is a failure or error in some part of the system. Fault tolerance helps applications fail fast and recover smoothly by guiding how and when certain requests occur and by providing fallback strategies to handle common errors.

Which of the following is not a good characteristic of a microservice? ›

Final Answer. The characteristic that is NOT a good characteristic of a Microservice is “It is implemented as a product”.

Which of the following could be a potential problem with microservices? ›

Problems of Microservices Architecture

Data consistency: Keeping data consistent across services can be challenging in a microservices architecture. Monitoring and testing: Monitoring and testing microservices can be more complex than in a monolithic architecture.

Top Articles
What is needs assessment? | Definition from TechTarget
[Solved] Question 1    Which of the following is an example of a contract?...
Bashas Elearning
Quick Pickling 101
Mate Me If You May Sapir Englard Pdf
Riegler & Partner Holding GmbH auf LinkedIn: Wie schätzen Sie die Entwicklung der Wohnraumschaffung und Bauwirtschaft…
What is IXL and How Does it Work?
Strange World Showtimes Near Amc Braintree 10
今月のSpotify Japanese Hip Hopベスト作品 -2024/08-|K.EG
Leeks — A Dirty Little Secret (Ingredient)
Foodland Weekly Ad Waxahachie Tx
Available Training - Acadis® Portal
Quest Beyondtrustcloud.com
What is Rumba and How to Dance the Rumba Basic — Duet Dance Studio Chicago | Ballroom Dance in Chicago
Eva Mastromatteo Erie Pa
R Cwbt
Mission Impossible 7 Showtimes Near Marcus Parkwood Cinema
CDL Rostermania 2023-2024 | News, Rumors & Every Confirmed Roster
Hermitcraft Texture Pack
Healthier Homes | Coronavirus Protocol | Stanley Steemer - Stanley Steemer | The Steem Team
Doki The Banker
Hannaford To-Go: Grocery Curbside Pickup
Bennington County Criminal Court Calendar
Cain Toyota Vehicles
Finding Safety Data Sheets
Hefkervelt Blog
Inter Miami Vs Fc Dallas Total Sportek
Top 20 scariest Roblox games
Buhl Park Summer Concert Series 2023 Schedule
Vadoc Gtlvisitme App
What Is Opm1 Treas 310 Deposit
Mastering Serpentine Belt Replacement: A Step-by-Step Guide | The Motor Guy
Evil Dead Rise - Everything You Need To Know
Calculator Souo
Rocksteady Steakhouse Menu
Desirulez.tv
Samsung 9C8
Foolproof Module 6 Test Answers
Elgin Il Building Department
Skyrim:Elder Knowledge - The Unofficial Elder Scrolls Pages (UESP)
Kornerstone Funeral Tulia
Improving curriculum alignment and achieving learning goals by making the curriculum visible | Semantic Scholar
Karen Wilson Facebook
Energy Management and Control System Expert (f/m/d) for Battery Storage Systems | StudySmarter - Talents
Jaefeetz
Rs3 Nature Spirit Quick Guide
Child care centers take steps to avoid COVID-19 shutdowns; some require masks for kids
Aznchikz
Grandma's Portuguese Sweet Bread Recipe Made from Scratch
Glowforge Forum
Renfield Showtimes Near Regal The Loop & Rpx
Latest Posts
Article information

Author: Lidia Grady

Last Updated:

Views: 6286

Rating: 4.4 / 5 (45 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Lidia Grady

Birthday: 1992-01-22

Address: Suite 493 356 Dale Fall, New Wanda, RI 52485

Phone: +29914464387516

Job: Customer Engineer

Hobby: Cryptography, Writing, Dowsing, Stand-up comedy, Calligraphy, Web surfing, Ghost hunting

Introduction: My name is Lidia Grady, I am a thankful, fine, glamorous, lucky, lively, pleasant, shiny person who loves writing and wants to share my knowledge and understanding with you.