Hystrix Vs. Sentinel: A Tale of Two Circuit Breakers (Part 1)

Hystrix has been pretty popular over the last several years. Now that it is in maintenance mode, many people are seeking alternatives. In this article, I will introduce Sentinel: an open-source Java flow control project. I will do so by comparing it with Hystrix, since more people are familiar with it. In this part, we’ll compare these two at a higher level. In the next article, we’ll look at some code examples.

Image for post
Image for post

What Is Sentinel?

History of Sentinel

  • 2013–2017: with the wild growth of microservices comes the challenge of reliability. Sentinel quickly grows into a tool to prevent cascading disaster.
  • 2018: Sentinel is open-sourced by Alibaba.

What Is Sentinel For?

Image for post
Image for post
  • Sential provides many options to handle flow control. Users can choose to shape traffic based on QPS, thread pool numbers, system load, as well as using commands directly to stop traffic or to perform cold start. User can also mix and match different rules. Hystrix doesn’t really offer comprehensive traffic shaping.
Image for post
Image for post
  • Sentinal offers fault isolation and circuit breaking. This is similar to Hystrix. However, their approaches are different.
  • Sentinal offers real-time monitoring. It also provides a dashboard to aggregate information from the distributed system.
Image for post
Image for post

How Is Sentinel Different From Hystrix?

Sentinel, on the other hand, uses a counter for each dependency. By doing so, not only does it save the overhead of managing the thread pool, but it also gives more control to the user. The user now gets to decide the granularity of degradation of the flow.

This table lists more details of the difference Hystrix and Sentinel in design and implementation:

Image for post
Image for post

This may seem a little overwhelming. Users won’t notice much difference from a user experience perspective, though.

The Ecosystem

Reference

Reference:https://www.alibabacloud.com/blog/hystrix-vs--sentinel-a-tale-of-two-circuit-breakers-part-1_594755?spm=a2c41.12843016.0.0

Follow me to keep abreast with the latest technology news, industry insights, and developer trends.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store