News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Ole Markus' Blog:
High load websites A lock on Memcachedget
December 27, 2010 @ 12:34:14

Ole Markus has a new post to his blog looking at a technique for working with memcached and fetching data out of the store using a binary semaphore for better performance.

A typical document takes but a few hundred milliseconds to generate when a single request for the document enters the backend. The problem is that this is a highload website. In its current form, the backend serves hundreds of pages per second. This pretty much guarantees that the backend will concurrently receive cache miss on multiple languages and at the same time also receive cache miss on the pre-translated document.

Given that he wants the translated version to be the one that's always shared, a problem can come up when the cache request is "missed" and the document starts generating from multiple places. His fix for the situation is that only the first miss generates and all others see a lock on it and wait for it to be removed before successfully fetching the result. He provides code in a "LockedMemcached" class to help make it all more useful.

0 comments voice your opinion now!
lock memcache get set high load website varnish


blog comments powered by Disqus

Similar Posts

PHPBuilder.com: Build Blazing Fast PHP Websites with Memcached Distributed Caching

Manuel Pichler's Blog: Howto create custom rule sets for PHPMD

Gennady Feldman's Blog: Pear/Pecl website improvement ideas and suggestions

Smashing Magazine: Cleaning Up The Mess: How To Keep Your Coding Workflow Organized

PHPBuilder.com: AJAX and PHP Part 3 - Post vs. Get Requests


Community Events





Don't see your event here?
Let us know!


package tips install interview release community laravel api opinion framework language podcast series deployment list update library introduction zendserver symfony

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework