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

  • A New Era Of Spring Cloud
  • Micro-Frontends in a Microservice Architecture
  • Designing Scalable and Secure Cloud-Native Architectures: Technical Strategies and Best Practices
  • Building Scalable AI-Driven Microservices With Kubernetes and Kafka

Trending

  • It’s Not About Control — It’s About Collaboration Between Architecture and Security
  • How the Go Runtime Preempts Goroutines for Efficient Concurrency
  • Building Enterprise-Ready Landing Zones: Beyond the Initial Setup
  • Integration Isn’t a Task — It’s an Architectural Discipline
  1. DZone
  2. Software Design and Architecture
  3. Microservices
  4. Cloud-Native Middleware Microservices

Cloud-Native Middleware Microservices

With cloud-native microservices, you can develop, test, deploy, and maintain independent lightweight services while combining various other technologies.

By 
Kai Wähner user avatar
Kai Wähner
DZone Core CORE ·
Mar. 05, 17 · Tutorial
Likes (4)
Comment
Save
Tweet
Share
6.2K Views

Join the DZone community and get the full member experience.

Join For Free

This article is featured in the new DZone Guide to the Cloud: Native Development and Deployment. Get your free copy for more insightful articles, industry statistics, and more!

Cloud-native microservices offer many benefits. You can develop, test, deploy, and maintain independent lightweight services. You can easily combine various technologies, including programming languages such as Java or Go, and tools like integration middleware.

However, as you do not build monoliths anymore, "that complexity has moved and [...] increased [to] the outer architecture," as Gartner states. For this reason, new design patterns (have to) emerge to solve the challenges of independent, distributed microservices.

Middleware is used to interconnect everything. This is even more important in microservice architectures, where you have even more independent, distributed, and scaled business logic. Thus, as I discussed already around two years ago: microservices might be the death of the Enterprise Service Bus, but integration and middleware (and other things like API Management or cloud-native concepts) will be needed more than ever before for microservice architectures.

Circuit Breaker Design Pattern for Resilient Microservice Architectures

The Circuit Breaker is one of these cloud-native design patterns. It allows for:

  • Fast failing and rapid recovery

  • Preventing cascading failures

  • Latency tolerance logic

  • Fault tolerance logic

  • Fallback Options

This is realized by rejecting service requests if a service is not available for whatever reason; in a microservice architecture, there can be many reasons or issues. The rejection is configured by various parameters such as request volume threshold or error threshold percentage. Martin Fowler has a great explanation of the Circuit Breaker design pattern. Therefore, I will just explain it shortly using one of his graphics:

Image title

The circuit is closed in the beginning. All service request get a successful response from the service. If a threshold of 5 failures is reached, the circuit is opened. New service requests are rejected. After a timeout of 1 minute, a new service request tries if the service is available again; therefore the circuit is half open in this state. Depending on the success or failure, the circuit is opened or closed after this service request.

This relatively simple pattern can get very powerful (depending on the configuration options) and allows you to build resilient microservice architectures with reduced latency and lowered resource consumption.

Netflix's Open-Source Implementation: Hystrix

Hystrix was open sourced by Netflix a few years ago and is by far the most widely used framework for using the circuit breaker pattern in a microservices architecture.

Microservice architectures and cloud-native platforms such as CloudFoundry or Kubernetes can leverage Hystrix to build resilient microservice deployments. In addition, you can use the Hystrix Dashboard to get some near real-time visualization. The video “Hystrix Dashboard — Tech Talk and Demo” shows a great introduction. Here is just a screenshot explaining the key aspects of the dashboard:

Image title

The dashboard does its job. But in a more sophisticated microservices architecture, you might leverage the benefits of a real-time streaming analytics visualization tool such as Zoomdata, Striim, or TIBCO Live Datamart. This allows not just monitoring live streaming data, but also applies continuous aggregations, rules, consolidation, and predictive analytics for automated or human- driven decision-making instead of just showing a monitoring dashboard for every microservice.


Read the rest of this article and a lot more in:Cloud Guide

DZone's Guide to the Cloud: Native Development and Deployment

Including:

  • Industry Research Data
  • Articles Written by Industry Experts
  • Cloud Architecture Infographic
  • Directory of the Best Tools & Solutions
Free Download

microservice Circuit Breaker Pattern Middleware Architecture

Opinions expressed by DZone contributors are their own.

Related

  • A New Era Of Spring Cloud
  • Micro-Frontends in a Microservice Architecture
  • Designing Scalable and Secure Cloud-Native Architectures: Technical Strategies and Best Practices
  • Building Scalable AI-Driven Microservices With Kubernetes and Kafka

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!