Earlier quoted context omitted.
hmm i wonder if a site like this would be a good candidate for cloudflare pages where bandwidth is unlimited (even though they have a 20K file limit). Then servers wouldn't need to serve any requests, and every time the source weather data is updated, you rebuild the files and push to cloudflare. love the site despite the ads. who/what did you use for i18n?
Disclaimer: I work on Cloudflare Workers so I was thinking about how they might be able to drastically cut their costs. Conceivably you could put up Cloudflare pages & put the assets behind a CDN with whatever TTL makes sense for how long the assets are expected to not expire for. I don't know how much that might save but certainly a cheap experiment to run. If you wanted to experiment with a completely alternate arc…
It also allows us to serve the entire page in a single request, and the gzipping of the SVGs works really well (~7x).
Keep in mind that every single graph would need 15 languages * typically 2 units = 15-30 versions. And each page has 10-20 graphs. And you can view each location by year/season/month/day, and the stations have histories sometimes going back to the 40s with a page for every single day (not indexed by Google). Not to mention the comparisons - we have some 150k locations that can be compared up to 5 at a time.
The combinatorial explosion makes pre-gen unattractive, and producing each graph in a separate request would also increase both server load and developer headaches.
If we re-architected the site today I'd probably do client side rendering of the charts, but the dev cost of making that change now would so far exceed any gains that it's not even funny.
(To be clear, the by far biggest cost of the service is developer time, not hosting cost, sorry if I implied otherwise)