Skip to content

cristalhq/hedgedgrpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hedgedgrpc

build-img pkg-img reportcard-img coverage-img version-img

Hedged Go GRPC client which helps to reduce tail latency at scale.

Rationale

See paper Tail at Scale by Jeffrey Dean, Luiz André Barroso. In short: the client first sends one request, but then sends an additional request after a timeout if the previous hasn't returned an answer in the expected time. The client cancels remaining requests once the first result is received.

Note

See also hedgedhttp for Go net/http.

Features

  • Simple API.
  • Easy to integrate.
  • Optimized for speed.
  • Clean and tested code.

Install

Go version 1.17+

go get github.com/cristalhq/hedgedgrpc

Example

Also see examples: examples_test.go.

Documentation

See these docs.

License

MIT License.