kipcole9 / attempt Goto Github PK
View Code? Open in Web Editor NEWRetry Budget in Elixir
License: Other
Retry Budget in Elixir
License: Other
When executing a function against an external service (HTTP service, database service - any service which may suffer failure) we have an objective to retry the function when the failure mode is retryable.
However we want to also protect the external service from excessive retries when the service itself is under load or suffering higher than normal failure rates. We also don't want retries to swamp the overall number of service requests.
We have two objectives:
Finagle's strategy is:
By default, the RetryBudget allows for about 20% of the total requests to be immediately (no backoff) retried on top of 10 retries per second in order to accommodate clients that have just started issuing requests or clients that have a low rate of requests per second.
Which says:
Rate limited to an external service still makes sense as an option but this is a separate (although related) issue to managing retries.
Problem statement is reasonable then we can approach a solution as
Estimate the maximum throughput in requests_per_second using the a sliding window of performance based upon successful requests.
Define the maximum percentage of total throughput that may be permitted for retries
The intent of this strategy is to:
Adapt to the available throughput on the target system - automatically ramp up and down as performance and load varies
Prevent retries from swamping the target system, especially when the target system is under load
Metrics. Since in many cases Attempt will be used in front of an external service its a reasonable place to capture performance and reliability metrics.
Required behaviour when a service is down, or flapping, may well be different. More like a fuse or circuit breaker?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.