Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cristalhq/hedgedgrpc
Hedged Go GRPC client which helps to reduce tail latency at scale.
https://github.com/cristalhq/hedgedgrpc
go golang grpc grpc-go
Last synced: 4 months ago
JSON representation
Hedged Go GRPC client which helps to reduce tail latency at scale.
- Host: GitHub
- URL: https://github.com/cristalhq/hedgedgrpc
- Owner: cristalhq
- License: mit
- Created: 2021-12-02T08:04:26.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-19T09:38:17.000Z (9 months ago)
- Last Synced: 2024-06-19T23:15:32.354Z (8 months ago)
- Topics: go, golang, grpc, grpc-go
- Language: Go
- Homepage:
- Size: 89.8 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hedgedgrpc
[![build-img]][build-url]
[![pkg-img]][pkg-url]
[![reportcard-img]][reportcard-url]
[![coverage-img]][coverage-url]
[![version-img]][version-url]Hedged Go GRPC client which helps to reduce tail latency at scale.
## Rationale
See paper [Tail at Scale](https://cacm.acm.org/magazines/2013/2/160173-the-tail-at-scale/fulltext) 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](https://github.com/cristalhq/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
```go
```Also see examples: [examples_test.go](https://github.com/cristalhq/hedgedgrpc/blob/main/examples_test.go).
## Documentation
See [these docs][pkg-url].
## License
[MIT License](LICENSE).
[build-img]: https://github.com/cristalhq/hedgedgrpc/workflows/build/badge.svg
[build-url]: https://github.com/cristalhq/hedgedgrpc/actions
[pkg-img]: https://pkg.go.dev/badge/cristalhq/hedgedgrpc
[pkg-url]: https://pkg.go.dev/github.com/cristalhq/hedgedgrpc
[reportcard-img]: https://goreportcard.com/badge/cristalhq/hedgedgrpc
[reportcard-url]: https://goreportcard.com/report/cristalhq/hedgedgrpc
[coverage-img]: https://codecov.io/gh/cristalhq/hedgedgrpc/branch/main/graph/badge.svg
[coverage-url]: https://codecov.io/gh/cristalhq/hedgedgrpc
[version-img]: https://img.shields.io/github/v/release/cristalhq/hedgedgrpc
[version-url]: https://github.com/cristalhq/hedgedgrpc/releases