Wednesday, July 30, 2008

Stop the dog-pile: freshen your cache

It's no question that RSSmeme has been gaining in popularity. With increased visitors comes increased load and with that comes increased wait times. RSSmeme caches the data that comes out of database for several minutes to keep things snappy but let's look at what happens when that cache gets old. Under the old, simplistic system:
  1. The home page cache gets old and stale.
  2. 50 visitors request the home page at the same exact time.
  3. The server gets clogged running the exact same query for all 50 visitors.
  4. Meanwhile more visitors hit other pages and nobody ever gets results because the server is overloaded; the dog-pile effect.
Under the new, system (using MintCache):
  1. The home page cache gets old.
  2. 50 visitors request the home page at the same exact time.
  3. The 1st visitor triggers a database query to get fresh data. The other 49 get the now slightly stale data. Only 1 call has been made to the database.
  4. The cache is updated with the fresh data that was sent to the 1st visitor and everyone is happy.
It's slightly more complicated but the results are already promising. Hopefully this keeps RSSmeme speedy.

Friday, July 11, 2008

Search RSS feeds and JSON disabled

RSSmeme has been slowing down over the last few days and my brief analysis looks like it's due to a lot of people using the search RSS feeds and API. Unfortunatly I've had to disable the search parameter for any format other than the standard HTML that RSSmeme displays.

I'll hopefully be able to restore this soon but in the meantime all of you using complicated Yahoo Pipes filters with RSSmeme might not be seeing results that you'd expect. Sorry.

Update: The personalize feature has also been disabled while I test things out.

Update: RSS and JSON re-enabled. Personalized feature still disabled.