Couldn't a web server game "time to first byte" stats by just immediately sending "HTTP" and then waiting for the actual app server response?

3
Share
Share on Mastodon
Share on Twitter
Share on Facebook
Share on Linkedin
⛈️⑨

@tenderlove I thought it was time to first content byte, because otherwise the metric makes no sense in an http/2 context.

1
8mo
Baloo

@tenderlove I did that for a frontend that was server rendered react and it was slow because of shit ton of backend api calls.

The server would reply immediately with the html, its head and a couple of elements of the body, just enough to get the browser to start fetching css, fonts, …
The rest would come later as the API would start replying.

This required some amount of work to get compression and buffering correct. We had to move the the compression near that code just so we could force a flush of its buffer. This also required a cache-control: no-transform to make sure the reverse proxies would not play funny.

0
8mo
Jean Boussier

@tenderlove Pitchfork/Unicorn does that by default.

Not to game any benchmarks though, but to check the client is still there.

0
8mo
Replies