Hedged requests — Tackling tail latency

Understanding and implementing hedged requests in golang

Ricardo Linck
The Startup

--

Distributed systems are amazing. They really are. But not everything about them is a win or a no brainer. We as engineers need to be extra careful and very diligent about implementing and using distributed systems for solving problems.

The truth is that implementing distributed systems is a very difficult task, the flexibility and scalability they bring to the table also comes with complexity and in some other cases even further hidden cons. Let’s make a quick recap.

Common reasons why people distribute systems:

  • Availability
  • Scalability
  • Partition tolerance
  • Independent deployments
  • Use of different technologies for different purposes

Things to be aware, that may be a problem with distributed systems:

  • Cost
  • Complexity
  • Consistency
  • Latency

In this article we will focus on latency, more specifically tail latency. Some techniques will be explained and a real implementation of two techniques will be shown as well. But first, there are some concepts we need to…

--

--

Ricardo Linck
The Startup

Software Engineer. Distributed systems lover, golang and .net enthusiast. Curious by nature. https://github.com/ricardolinck