JavaScript budget

  • Tune
  • Pixel 02

Difficulty 2 of 5

Phones on 4G at 9 Mbps open the shop app. The web server sends 1.5 MB of JavaScript, and a mid phone needs 1 s to parse and run each MB. The page is ready after 2.9 s at p99. Get it under 1.5 s. Tune only the payload factor and the compression level.

Play level

HTTP/2Mobile users20 req/sNode API8 vCPU · 8 GB
HTTP/2Mobile users20 req/sNode API8 vCPU · 8 GB
The board at the start of the level
A page waits for its slowest callDrag or use arrow keys to change the calls per page

Calls per page: 20 · 18% of pages wait 2.0 s

Goals and limits

p99 latency
under 1.5 s
Error rate
under 0.1%
Monthly cost
under 200 USD/mo
Traffic
20 req/s

Concepts

How players did

Player results load from the server.