on 11-May-2017 05:00
Last year I wrote about the tradeoffs embedded in Nagle's algorithm. I also described our "AutoNagle" setting, which meant to take some of the pain out of figuring out what to do with this feature. Beginning in TMOS® version 13.0, we've substantially improved the logic to make the right decision for your application, without you having to get involved.
But first, a refresher. Nagle's Algorithm seeks to reduce the number of packets TCP sends by sacrificing latency. When it has less than one full packet to send, it will wait for additional data until all data in flight is acknowledged. This reduces the waste of sending more headers, and saves power on mobile devices, but it also means that the last packet of a message tends to wait at least a few milliseconds and hold up the next step in the transaction. Whether or not that trade is worth it depends a lot on the specifics of your network.
Our Autonagle algorithm already handled some common cases to make a smart decision. But now, the logic covers a much wider range of circumstances.
There are users out there that want to always minimize packet counts, or always minimize latency. For them, we still have the choice to enable or disable Nagle's algorithm altogether. For everyone else, you're probably best off just letting F5 figure out this setting for you.
*If there is an HTTP/2 profile present as well, it will not enable Nagle.
This is a really great article, and I'm really glad you guys decided to implement this feature. I've worked for a number of companies that used F5 equipment, and only at one of them was there a good understanding of what Nagle's algorithm was, and only at that company did anyone attempt to correctly turn it on or off. Even still, a lot of the time we didn't have the time to try to figure out whether Nagle was beneficial for a given application, so we just defaulted to leaving it off, accepting that we'd not be optimized. Having this be handled automatically is great and should benefit almost everybody.