Skip to content
/ shed Public

๐Ÿš Cross service client timeout/deadline propagation and load-shedding for Ruby and Go.

License

Notifications You must be signed in to change notification settings

CGA1123/shed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

44 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš shed

Go Reference Go CI Status

Ruby CI Status

shed is a Go and Ruby library implementing cross-service timeout/deadline propagation and load shedding.

What?

timeout/deadline propagation means advertising the client-side timeout for HTTP requests. shed uses the X-Client-Timeout-Ms header to do this.

load shedding means dropping requests early when under load in order to free up resources. This can be done throughout the lifetime of the request, or before processing the request (e.g. if the request has been queued for longer than its client timeout).

Why?

Uncontrolled performance degradation of a service can quickly lead to resource exhaustion and cascading failures. Client progations and load-shedding along with other techniques (such as setting appropriate timeouts, retries, circuit breakers, etc.) can improve the manner in which your service fail under load.

Propagating client timeouts and shedding requests based on this allows your services to make more informed decisions about which requests are still worth processing, saving your limited and already over-utilised resources for requests that are still meaningful to process. This avoid wasted resources, improves availability under load, and speeds up recovery times by controlling request queueing.

In experiment run in CGA1123/loadshedding-experiment-ruby load-shedding across a single service hop with client timeout propagation improved availability of services by a factor of 10 under load.

About

๐Ÿš Cross service client timeout/deadline propagation and load-shedding for Ruby and Go.

Resources

License

Stars

Watchers

Forks

Packages