We have a high traffic site similar to StackOverflow with an object cache in memcache. The site is built with PHP (CodeIgniter) and MySQL.
Each time a TTL (lifetime) expires on a cached object that is part of the loading of each page, all page loads at this point lead to a query in the database, effectively performing DDOS on the database.
Is there a way for only one pageload to retrieve data and load another page, waiting for the cache to be updated first?
My first idea is to get the randomizer to work so that some of the pages load data, while others have to wait a second before revising the cache. But, of course, there should be a better way.
source
share