Alias Method

This post is about a brilliant algorithm called the Alias Method. This method allows you to generate samples according to a discrete probability distribution in constant time. In other words, it allows you to simulate a loaded or…

Using Memcache at Scale (Facebook)

My last post summarized why I chose memcached over Redis for our system’s caching layer. Memcache fit our desired feature set and was also faster (probably due to the relatively simple workload, set and get…

Redis and Memcache

I’m launching into a project to implement a distribute cache in front of our bidding and impression layer. Part of the project is to evaluate caching technologies and the most popular technologies are: redis and…