node

node

@boutell @louis over a decade ago i used a vps for a work site that slowed down massively in the afternoons. i suspect i shared the hardware with a site that used a lot of i/o or something. my solution was to pre-render page templates twice a day and store them in redis with a ttl of three days. pre-rendering them meant it took very little cpu to push them to the browser, and keeping them in memory meant almost no disk i/o for most of the day.

it took a total of 140-150 kbyte/page (there were three variations) and there were about 700 pages in all.

using redis instead of memcached meant if the vps rebooted unexpectedly or something, it could still load up the page templates from disk and be up and running within seconds.

replies
0
announces
0
likes
3