Skip to main content

Lightweight fault tolerance primitives for your modern Python microservices

Project description

Hyx

🧘‍♂️️Lightweight fault tolerance primitives for your resilient and modern Python microservices

Package Version Downloads Supported Python Versions


Hyx provides you with a toolkit that includes common fault tolerance patterns like:

  • bulkhead
  • cache
  • circuit breaker
  • circular buffer
  • fallback
  • rate limiter
  • retries
  • timeout / time limiter

All components are designed to be:

  • asyncio-native
  • in-memory first
  • dependency-less

With that patterns you should be all set to start improving your resiliency right after the library installation.

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
🤝 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hyx-0.0.2rc0.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

hyx-0.0.2rc0-py3-none-any.whl (22.6 kB view details)

Uploaded Python 3

File details

Details for the file hyx-0.0.2rc0.tar.gz.

File metadata

  • Download URL: hyx-0.0.2rc0.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.1 CPython/3.9.7 Darwin/21.4.0

File hashes

Hashes for hyx-0.0.2rc0.tar.gz
Algorithm Hash digest
SHA256 d725518b2e068b20ea1789ce606a5b2884125ca7777b88848759da71228c86c7
MD5 02e521184d7c75d3859807f4b78a2e81
BLAKE2b-256 edd08534ee307d12fb66aa5b3a2c88f85efd202f7606e3bddc9f25903f5a2846

See more details on using hashes here.

File details

Details for the file hyx-0.0.2rc0-py3-none-any.whl.

File metadata

  • Download URL: hyx-0.0.2rc0-py3-none-any.whl
  • Upload date:
  • Size: 22.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.1 CPython/3.9.7 Darwin/21.4.0

File hashes

Hashes for hyx-0.0.2rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 1dd5ccaf0e2ac7339f321fa88aff0094c5b22845ecf193067afc37e1bdfb0261
MD5 4fa90dcabaa6e85c883a4e44b73afc96
BLAKE2b-256 32eb6ed9557bd44a8af3ffb071d9868e2a60098e193279768f5144b8c592bb37

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page