Get Advice Icon

Need advice about which tool to choose?Ask the StackShare community!

Hystrix

174
163
+ 1
2
Polly

72
37
+ 1
0
Add tool

Hystrix vs Polly: What are the differences?

Hystrix and Polly are both circuit breaker libraries that help developers implement fault tolerance and resilience in their applications. While they serve a similar purpose, there are key differences between the two.

  1. Programming Languages Supported: Hystrix is primarily designed for Java applications, whereas Polly is designed for .NET applications using C#. This difference in supported programming languages can greatly influence the compatibility and adoption of these libraries in different ecosystems.

  2. Integration: Hystrix integrates seamlessly with Netflix components, such as Eureka for service discovery and Ribbon for load balancing, making it a popular choice for microservices architecture built on the Netflix stack. On the other hand, Polly is built to integrate with the .NET ecosystem, leveraging features provided by ASP.NET Core, such as Dependency Injection and HttpClientFactory.

  3. Configuration Flexibility: Hystrix provides a rich set of configuration options, allowing developers to fine-tune circuit breaker behavior, thread pool settings, and timeouts. Polly, on the other hand, offers a simpler configuration model with sensible defaults, making it easier to get started quickly. This difference in configuration flexibility allows developers to choose between highly customizable behavior or simplicity.

  4. Advanced Resilience Features: Hystrix supports additional features like request caching, request collapsing, and request staging, which can be beneficial in complex scenarios. Polly, while it focuses on the core circuit breaker pattern, provides additional resilience policies such as Retry, Timeout, Bulkhead, and Fallback, offering a wider range of options for handling failures.

  5. Community Support and Momentum: Hystrix, being an older library, has a larger community and has been battle-tested in production systems over the years. It has gained considerable momentum and offers extensive resources and examples. Polly, on the other hand, is relatively newer but has been gaining popularity in the .NET community, with a growing number of contributors and resources.

  6. Async Support: Hystrix provides built-in support for asynchronous operations, allowing developers to easily handle non-blocking calls. Polly, too, offers async support, but it requires some additional configuration and setup to work seamlessly with asynchronous code.

In Summary, Hystrix and Polly have their own strengths and cater to different programming languages and ecosystems. Hystrix is a robust choice for Java-based applications with extensive configuration options and advanced features, while Polly offers simpler configuration, wider range of resilience policies, and great integration with the .NET ecosystem.

Manage your open source components, licenses, and vulnerabilities
Learn More
Pros of Hystrix
Pros of Polly
  • 2
    Cirkit breaker
    Be the first to leave a pro

    Sign up to add or upvote prosMake informed product decisions

    What is Hystrix?

    Hystrix is a latency and fault tolerance library designed to isolate points of access to remote systems, services and 3rd party libraries, stop cascading failure and enable resilience in complex distributed systems where failure is inevitable.

    What is Polly?

    It is a .NET resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback in a fluent and thread-safe manner.

    Need advice about which tool to choose?Ask the StackShare community!

    What companies use Hystrix?
    What companies use Polly?
    Manage your open source components, licenses, and vulnerabilities
    Learn More

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with Hystrix?
    What tools integrate with Polly?
    What are some alternatives to Hystrix and Polly?
    Akka
    Akka is a toolkit and runtime for building highly concurrent, distributed, and resilient message-driven applications on the JVM.
    Envoy
    Originally built at Lyft, Envoy is a high performance C++ distributed proxy designed for single services and applications, as well as a communication bus and “universal data plane” designed for large microservice “service mesh” architectures.
    Istio
    Istio is an open platform for providing a uniform way to integrate microservices, manage traffic flow across microservices, enforce policies and aggregate telemetry data. Istio's control plane provides an abstraction layer over the underlying cluster management platform, such as Kubernetes, Mesos, etc.
    Zuul
    It is the front door for all requests from devices and websites to the backend of the Netflix streaming application. As an edge service application, It is built to enable dynamic routing, monitoring, resiliency, and security. Routing is an integral part of a microservice architecture.
    Git
    Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
    See all alternatives