thenfour / digifujam

32 stars 1 forks source link

Perf: Separate static file serving from realtime websocket stuff #251

Closed thenfour closed 2 years ago

thenfour commented 2 years ago

see also: https://expressjs.com/en/advanced/best-practice-performance.html#do-logging-correctly

A dedicated CDN is not very practical, however here's how I can break this down.

There are the following types of resources:

First idea was to make everything fully static by default, and just move the performance-critical websocket to some other server. But that's probably way more complex than just moving static resources to a different URL.

So here's the plan:

And then i found https://www.jsdelivr.com/, which will ease the load for the static file loading. Only trick will be to request the correct version. Need to calculate the current git revision.