Git Product home page Git Product logo

hyx's Introduction

Hyx

πŸ§˜β€β™‚οΈοΈLightweight fault tolerance primitives for your resilient and modern Python microservices

Package Version Downloads Supported Python Versions Discord
Documentation Status Test Status Coverage


Hyx (/ˈhʌΙͺx/) is a set of well-known stability patterns that are commonly needed when you build microservice-based applications. Hyx is meant to be Hystrix (Java), resilience4j (Java) or Polly (C#) but for the Python world.

Key Features

  • Implements five commonly used resiliency patterns with various configurations based on advice and experience of industry leaders (e.g. AWS, Google, Netflix)
  • Idiomatic Pythonic implementation based on decorators and context managers
  • AsyncIO Native Implementation
  • Lightweight. Readable Codebase. High Test Coverage

Requirements

Installation

Hyx can be installed from PyPi:

pip install hyx

# or via poetry
poetry add hyx

Component Map

Component Problem Solution Implemented?
πŸ” Retry The failures happen sometimes, but they self-recover after a short time Automatically retry operation on temporary failures βœ…
πŸ’Ύ Cache
⚑️ Circuit Breaker When downstream microservices have got overloaded, sending even more load can make the situation only worse. Stop doing requests to your failing microservice temporarily if amount of errors exceeded expected thresholds. Then see if the given time helped the microservice to recover βœ…
⏱ Timeout Sometimes operations may take too much time. We cannot wait that long or after that time the success is unlikely Bound waiting to a reasonable amount of time βœ…
🚰 Bulkhead If executed without control, some code can take too much resources and put down the whole application (and upstream services) or cause slowness of other places of the application Fix the amount of calls to the code, queue other calls and fail calls that goes beyond your capacity βœ…
πŸƒβ€β™‚οΈ Rate Limiter The microservice can be requested with any rate even one that can put it down if happens by accident Limit the rate your system can be accessed by βœ…
🀝 Fallback Nothing can guarantee you that your dependencies will work. What would you do when it's failing? Degrade gracefully by defining some default values or placeholders if your dependencies are down βœ…

Inspired by Polly's Resiliency Policies

Acknowledgements

hyx's People

Contributors

roma-glushko avatar chris2w avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.