You can also cache the dinamic part by setting a small TTL to reduce needed processing, like 5s. Your backend will have to process only once every 5s for each json no matter the amount of people pooling data.
It turns out that the best thing to do is actually to just put [the SVG images] inline into the JavaScript as data: URLs; you get rid of 12 of those 18 requests…
I wonder how much HTTP1 vs HTTP2/3 changes this balance?
You can also cache the dinamic part by setting a small TTL to reduce needed processing, like 5s. Your backend will have to process only once every 5s for each json no matter the amount of people pooling data.
I wonder how much HTTP1 vs HTTP2/3 changes this balance?
In my experience, not much. Inlining is pretty much always the fastest thing.