DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • Scaling Micro-Frontends With Orchestrators
  • Scaling Java Microservices to Extreme Performance Using NCache
  • Micro Frontends Architecture
  • Unveiling the Application Modernization Roadmap: A Swift and Secure Journey to the Cloud

Trending

  • Infrastructure as Code (IaC) Beyond the Basics
  • The Full-Stack Developer's Blind Spot: Why Data Cleansing Shouldn't Be an Afterthought
  • Contextual AI Integration for Agile Product Teams
  • Ensuring Configuration Consistency Across Global Data Centers
  1. DZone
  2. Data Engineering
  3. Data
  4. Scaling Microservices: The Challenges and Solutions

Scaling Microservices: The Challenges and Solutions

Microservices are sought after for their versatility, but scalability provides a challenge. Let's discuss solutions to scaling while maintaining performance.

By 
Stefan Thorpe user avatar
Stefan Thorpe
DZone Core CORE ·
Aug. 14, 18 · Opinion
Likes (3)
Comment
Save
Tweet
Share
34.2K Views

Join the DZone community and get the full member experience.

Join For Free

The increasingly popular microservices model — by which software solutions are comprised of multiple modular components — is a very powerful and increasingly popular one. Not only does it allow for solutions to be formulated from the best individual components available, it also allows for the most effective services to be redeployed in different combinations. In this way, microservices represent a much more versatile solution to many common computing challenges.

But while microservices can be combined in an endless array of combinations in order to tackle a variety of problems, the concept and architecture present a series of unique challenges when it comes to scalability. That’s not to say that microservices are not scalable, they are considered more scalable than their preceding monolithic legacy applications, but they do require a very different approach to scaling.

The Scalability Problem

At the heart of these challenges lies something of a paradox. The versatility of microservices is one of their strongest characteristics, but that versatility comes at a price.

Aside from their individual, modular nature, microservices are particularly versatile solutions because the individual components can be run across a variety of platforms. In fact, it is quite common for a microservice-based solution to consist of multiple different virtualizations and servers working together. This represents a drastically different architecture to legacy IT solutions, and as such, it demands that we think about scalability differently.

When you are running a single monolithic application from a single server, you can handle an increase in demand by allocating more resources to the application. Alternatively, if the increase in demand is the result of more individual users making use of an application, you can begin running new instances of it and spread the load more evenly.

With microservices, on the other hand, upscaling can involve handling a number of different components and services. This means that either all the components need to upscale at the same time, or you need a means of identifying which individual components to upscale, and a method of ensuring that they can still integrate with the rest of the system.

Measuring Performance

Of course, as with all services, regardless of what is going on in the backend of your system, it is the end-user experience that matters the most. If the customer experiences a decrease in speed or reliability, then whatever solution you have implemented has, in their eyes, failed in its role. You don’t have to work in the industry for very long to understand that the end-user cares little for your displays of technical finesse. All that matters to them is their overall experience, as determined by the performance of the service they are using.

Considering the problem of scalability from this perspective encourages you to look beyond the back-end server-side situation and to focus your attention on the experience of the end-user. A common mistake that is made when upscaling microservices is to only consider the back-end; implementing solutions because they should work, not because they have been shown to work in a real-world situation. An invaluable tool for ensuring the best possible end-user experience is an application delivery controller (ADC), which allows you to detect any possible performance issues. ADCs are inherently useful because they are Layer 7 load balancers with extra features which facilitate the automation of scaling. From both the perspective of the service operator and the end-user, an automated solution is the best approach to take.

However, you can’t just use any old ADC. Traditionally, ADCs are designed to handle an application that is running on a single platform located in a single location. This type of ADC won’t be much help with a microservice framework that is spread across multiple platforms and systems. Fortunately, there are more modern ADC systems that are suitable for microservices, known as ‘microservice-aware’ ADCs. This type of ADC allows you to monitor the performance of your service and optimize its performance, regardless of its location, or the platform it’s running on.

Maintaining Performance

With an effective monitoring system in place and an understanding of what your goals should be with regards to performance and efficiency, you can then begin to formulate a strategy for maintaining optimal performance. While monitoring your performance will give you valuable and critical insight into how well your app or service is operating, you also need to know how to interpret those results.

There are a number of influencing factors that can affect the performance of microservices when upscaling. Scalability and performance are two different metrics, yet they are intimately entwined with one another. There are two key aspects to the design of a microservice that will determine its performance when scaling and these are concurrency and partitioning.

Concurrency refers to the process by which each individual task is divided into smaller pieces. Partitioning, meanwhile, will determine how efficiently these smaller pieces can be processed in parallel to one another. Scalability is determined by how efficiently tasks are divided and broken down, while performance is a measure of how efficiently the system is able to process these tasks.

A popular and successful microservice system can expect a steady rise in traffic, and therefore resource demands, over time. In order to scale successfully, each individual microservice needs to scale both individually, and as part of a larger system. Doing so requires that the dependencies of each microsystem also scale with it.

Resource Allocation

In considering the scalability of a microservice system, it is useful to consider hardware properties as resources. This includes things like the CPU specifications, data storage, RAM, and other similar properties. All of these things are finite and represent the physical properties and capabilities of the system. The biggest challenge for the service provider, at least in terms of resource allocation, is prioritizing appropriately.

In order to appropriately prioritize a system’s resources, you will need to understand which microservices are the most essential. If your microservice system is handling requests from businesses and individuals, it is generally the businesses that you will want to give priority to. This might mean ensuring that certain microservices which are used by your business users but not by individual users, are given priority. Or you could approach it by giving service priority to users connecting from certain IP addresses.

Microservices require a very different approach to monolithic systems when scaling. When scaling microservices, you need to consider both the individual components and the system as a whole. However, with an understanding of the particulars of microservice scaling, you stand a very good chance of succeeding.

microservice Scaling (geometry) End user application

Published at DZone with permission of Stefan Thorpe, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Scaling Micro-Frontends With Orchestrators
  • Scaling Java Microservices to Extreme Performance Using NCache
  • Micro Frontends Architecture
  • Unveiling the Application Modernization Roadmap: A Swift and Secure Journey to the Cloud

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!