I did some upgrades on package.elm-lang.org a while back. You probably noticed the visual changes, but the focus was on keeping our servers cheap and easy to maintain. Seems like everything has been going well with these changes:
-
All requests goes to a unified Haskell binary. It used to be two binaries, one that was built a long time ago, and quite hard to rebuild.
-
The unified binary is restarted by
systemd
. I had been usingmonit
for a while, but it seemed like it was worthwhile to switch. -
Many files are stored gzipped. The old server stored
docs.json
,README.md
, etc. The new server storesdocs.json.gz
,README.md.gz
, etc. My measurements showed that we went from 250mb to 50mb for storing the various metadata files for all packages. So that seems promising for staying on cheaper machines. -
Clients download 80% less. The new build process gzips and minifies the Elm code as well. Between that and the smaller metadata files, I was seeing about 80% less data being sent to visitors with an empty cache.
We also have a EU based admin now, so if something goes wrong in spite of these improvements, we have more hours of the day covered. The visual updates were all inspired by @dmy’s excellent work!
There is some work on fonts that I wasn’t able to complete on my own. I will ask for help on that in a separate thread.