Page is a not externally linkable
- Hardware and OS Related Technologies
-- Website Technology Issues
---- Saving the state of memcache when rebooting a system


maximillianos - 2:03 pm on Sep 9, 2010 (gmt 0)


Just a quick update. I did end up completing a script that would replace chunks of data in memcache for minor changes. It worked for my first test run, but I quickly realized it was just too much maintenance and risk to use it regularly.

So I designed a new script to essentially "reload" memcache whenever I make a change to the affected scripts. It is quite simple and it involves a perl script that just loops and calls my pages with "wget". I had to configure my stat software to ignore the requests, and I also had to configure my anti-scraper software to ignore the requests as well.

I added in some controls to be able to space the requests out over time to reduce load on the server. It works very well. It takes a full night of running to completely reload the cache, but my server is pretty slow at night anyway, so it works out perfectly. Plus it keeps me on a controlled change release schedule. Any code changes get rolled out over night and not during high traffic times. A win-win solution. =)


Thread source:: http://www.webmasterworld.com/website_technology/4123721.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com