Skip to main content

Posts

Showing posts from June, 2017

When two choices are enough

I came across the  power of two choices   theorem recently, it was referenced in a tech talk about schedulers. The central premise of the power of two choices is simple. Yet it is striking in its effectiveness in making decisions about routing requests. The following is my restatement of the premise: You have n options, and a score or rank associated with each of them. You also have an incoming queue of decisions to make about which option to pick. At each decision point, if you pick two options from the n at random, and then use the score to pick the best among those two, you will get exponentially better results (in terms of distributing load), than choosing a random option.  Going from best of two, to best of 3 or 4 or more, only improves the results by a constant factor.  Using power of two choices really starts to pay off when n is very large and examining all n options becomes prohibitively expensive.  The paper applies this to load balancing, where they showed how effec