, 5 tweets, 1 min read
My Authors
Read all threads
Lovely primer on HTTP/2, but it misses the biggest advantage: Breaking up a big, sequential request into smaller, concurrent parts. Say you have a compound request that takes 200ms... evertpot.com/h2-parallelism/
If you can break that into one initial request that takes 50ms, followed by 3 concurrent requests each taking 50ms, in the HTTP/2 example, you’ll only spend ~100ms on the full request, because the 3 x 50ms requests happen simultaneously over the 1 TCP connection.
And breaking the big compound request into 4 smaller requests have massive cache advantages too. The compound request needs to resend THE WHOLE THING if any of the 4 sub-parts change. The broken up version gets 4 local caches that can live much longer.
This is the problem with essentially HELLO WORLD testing. Most real apps don’t have full, compound requests that only take like 5ms. They often take 50ms, 100ms, 200ms, or maybe even 500ms! Then the HTTP/2 approach with smaller, individual requests is huge.
We’ve been working on some new framework techniques at Basecamp specifically targeted at taking advantage of how HTTP/2 changes the trade-offs. It’s been a massive code simplification AND speed optimization. Excited to share our work later this year!
Missing some Tweet in this thread? You can try to force a refresh.

Enjoying this thread?

Keep Current with DHH

Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!