Rootconf Mini 2024

Geeking out on systems and security since 2012

Tickets

Loading…

Mourjo Sen

@mourjosen

Congestion control in web services

Submitted Oct 29, 2024

TCP achieves reliable communication over an unreliable network (IP). It does so by abstracting the underlying network and observing only the sender and the receiver. This is a cornerstone for the internet’s success and is called the “end-to-end principle”.

As a corollary, it is then possible to impress global behavior by making local measurements and choices regarding reliability - and that is exactly what TCP’s congestion control does - no central repository of metrics, no distributed tracing or structured logging - simple local measurements and decisions made on one machine - converging eventually to make the global inter-network congestion free.

Congestion can happen in webservers too - think about too many requests from the end-user or a degraded downstream dependency causing all requests to pile up, eventually making the service non-responsive to any new request.

So how can we leverage the end-to-end principle in avoiding congestion in our web servers? In this talk I take inspiration from TCP’s congestion control and explain how that can help us build more resilient web services.

There are two important questions I will answer: How can we detect congestion? What can we do to recover from it once we detect it? I will answer both questions using local measurements in web applications that scale globally to a fleet of web servers, just like TCP’s congestion control.

Comments

{{ gettext('Login to leave a comment') }}

{{ gettext('Post a comment…') }}
{{ gettext('New comment') }}
{{ formTitle }}

{{ errorMsg }}

{{ gettext('No comments posted yet') }}

Hybrid Access Ticket

Hosted by

We care about site reliability, cloud costs, security and data privacy