question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for backup requests / hedge requests

See original GitHub issue

Summary

Add support to linkerd to enable backup requests also known at hedge requests.

Context

Backup requests can be used to reduce the overall latency of a system, specifically tail latency. If a request starts to take longer than the n-th percentile, you can choose to issue the same request again, and use the response of the request which replies first to send to the client. This may work well for read requests without requiring modification of downstream systems.

Further reading and context:

Possible Implementation

I’ve never used linkerd before so this might be way off!

Looking at the configuration documenation it seems like retires might be a good place to configure backup requests. Whilst a backup request isn’t exactly a ‘retry’ it feels close enough?

Retry backup request

Key Default Value Description
quantile 95 The response latency quantile, above which a backup request will be issued. Must be between 0 and 100, exclusive.
clipDurationSec 60 The maximum duration to measure. Used to create the latency histogram. Requests that take longer than clipDurationSec will be added to the histogram using this upper bound.
historySec 3600 The length of time to keep latency information, used when calculating the quantile

Tasks

  • Decide on implementation
  • Create pull request
  • Code review

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:5
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ewildecommented, Apr 4, 2018

@amitsaha as @jacktuck mentioned I’m not sure this approach would work for apis that are not idempotent. Perhaps we could include a response classifier section in the configuration similar to https://linkerd.io/config/1.3.5/linkerd/index.html#http-response-classifiers, this then allows the linkerd user to determine which types of requests can be hedged

1reaction
gsogolcommented, May 24, 2017

This is a great request. Something I’ve been thinking about as well. Would be an awesome feature.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hedged requests — Tackling tail latency - Medium
Definition and implementation in golang of Hedged Requests. Simple technique to improve tail latency, based on the Tail of Scale paper.
Read more >
MethodBuilder — Finagle 22.4.0 documentation
Backup requests, or hedged requests, are a means of reducing the tail latency of requests that are known to be safe to issue...
Read more >
Postlab Drive - Hedge
If you need a backup of your specific data, check out our Snapshot service, or talk to us about backing up your Drive...
Read more >
Best practices for Cloud Storage | Google Cloud
As a result, even though ACLs will prevent unauthorized third parties from operating on buckets or objects, a third party can attempt requests...
Read more >
Securities Law - Sidley Austin LLP
hedge fund and its investors with respect to the gate's attributes. ... to substantial redemption requests, because it has better liquidity.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found