Delivering HTTP/2 upload speed improvements
Aug 24, 2020Junho Choi, Lucas Pardue, Rustam Lalkaka

Summary
This post details an investigation and fix for slow HTTP/2 upload speeds, particularly on high-bandwidth connections. The issue was identified as a bottleneck in NGINX's HTTP/2 receiver flow control, specifically the fixed-size `client_body_buffer_size`. The solution involved implementing an autotuning mechanism for the HTTP/2 request body buffer size, dynamically adjusting it based on the network's Bandwidth-Delay Product (BDP) to match TCP's autotuning behavior. This resulted in significant upload speed improvements, bringing HTTP/2 performance closer to or exceeding HTTP/1.1.