Announcing libvmod-tcp: Adjust Varnish congestion control algorithm.

I’ve uploaded my new TCP VMOD for Varnish 4 to github, you can find it here:

This VMOD allows you to get the estimated client socket round trip time, and then let you change the TCP connection’s congestion control algorithm if you’re so inclined.

Research[tm][0] says that Hybla is better for long high latency links, so currently that is what it is used for.

Here is a quick VCL example:

if (tcp.get_estimated_rtt() > 300) {
set req.http.x-tcp = tcp.congestion_algorithm("hybla");

One thing to note is that VCL handling is very early in the TCP connection lifetime. We’ve only just read and acked the HTTP request. The readings may be off, I’m analyzing this currently.
(As I understand it the Linux kernel will keep per-ip statistics, so for subsequent requests this should get better and better..)

0: Esterhuizen, A., and A. E. Krzesinski. “TCP Congestion Control Comparison.” (2012).

This entry was posted in varnish and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s