Re:7 Years Of YouTube Scalability Lessons In 30 Minutes
by alexgartrell on Monday March 26, 2012 @04:34PM
(#3758514)
As a datapoint, we use jitter a lot in cache infrastructure at Facebook
Re:7 Years Of YouTube Scalability Lessons In 30 Minutes
by cpeterso on Monday March 26, 2012 @07:46PM
(#3759196)
The Adblock Plus blog details the thundering herd problems they faced. Their ad blocking lists checked for updates every 5 days. Eventually, many users' update schedules would converge on Mondays because office computers did not run over the weekend. Updates that had been scheduled for Saturday or Sunday would spill over to Monday.
https://adblockplus.org/blog/downloading-a-file-regularly-ho...
Re:7 Years Of YouTube Scalability Lessons In 30 Minutes
by sk5t on Monday March 26, 2012 @08:36PM
(#3759367)
Windows does much the same thing w.r.t. policy refresh (which sucks down files from domain controllers) and update of "occasionally updated" metadata like last logon timestamp.
Re:7 Years Of YouTube Scalability Lessons In 30 Minutes
by colmmacc on Monday March 26, 2012 @04:59PM
(#3758618)
A related technique is to use distinct prime numbers for periodicities in the first place:
http://www.stdlib.net/~colmmacc/2009/11/26/period-pain-3/
(http://www.stdlib.net/~colmmacc/2009/09/27/period-pain-part-... http://www.stdlib.net/~colmmacc/2009/09/14/period-pain/ for the background material).
The reasons primes are optimal should be obvious :)
Re:7 Years Of YouTube Scalability Lessons In 30 Minutes
by toddh on Monday March 26, 2012 @05:28PM
(#3758752)
As an interesting counter point, Jeff Dean at Google says they prefer to have a known hit every once in a while, so they will have all the cron jobs go off at the same time versus introducing jitter. It perhaps has to do with their emphasis on reducing variability to control the size of the long tail distribution.
Re:7 Years Of YouTube Scalability Lessons In 30 Minutes
by jamii on Monday March 26, 2012 @04:57PM
(#3758609)
A nice extension of this is to use exponentially distributed delays. Then reoccurring events form poisson processes which are really easy to reason about when composed eg if you have N servers firing off events at the same exponentially distributed rate the times are distributed the same as if you had one server firing events at N x the rate and distributing jobs uniformly at random to the other servers.
Re:7 Years Of YouTube Scalability Lessons In 30 Minutes
by cpeterso on Monday March 26, 2012 @07:53PM
(#3759222)
A counterexample is that the Linux kernel tries to schedule timer events for the same deadline time. That allows the processor to sleep longer because the kernel doesn't need to wake up as often just to handle 1 or 2 timer events.
Re:7 Years Of YouTube Scalability Lessons In 30 Minutes
by cbsmith on Monday March 26, 2012 @04:52PM
(#3758584)
It's kind of a weird way to describe it. The better way is that you want your caching to be probabilistic rather than deterministic. In general, you want to avoid anything that would get the nodes in a distributed system to harmonize.
The other way to solve the problem though would be to handle that circumstance cleanly. There are ways to resolve a thundering herd without creating a scalability problem.
Re:7 Years Of YouTube Scalability Lessons In 30 Minutes
by davnola on Monday March 26, 2012 @03:46PM
(#3758326)
I've heard it called "splay" before e.g. `chef-client` will take an interval option and a splay option. Splay is a random amount of time added to the interval to prevent thundering herds.
Re:7 Years Of YouTube Scalability Lessons In 30 Minutes
by breidh on Monday March 26, 2012 @04:43PM
(#3758552)
On this topic, an interesting paper from 1994 on adding randomization to network traffic sources:
Re:7 Years Of YouTube Scalability Lessons In 30 Minutes
by minimax on Monday March 26, 2012 @11:34PM
(#3759893)
Fascinating paper, even if it is 18 years old now. Thanks.
Re:7 Years Of YouTube Scalability Lessons In 30 Minutes
by peterwwillis on Monday March 26, 2012 @04:19PM
(#3758455)
In the past i've seen jitter used in all sorts of applications, from cron jobs to configuration management to memcache key expiration. Any time you have a crapload of nodes that all need to do an operation at a specific time you rely on jitter to keep resources from bottlenecking. Probably used anywhere the systems or network has a miniscule amount of resource headroom (like cluster nodes that run at 93% utilization)
Re:7 Years Of YouTube Scalability Lessons In 30 Minutes
by makmanalp on Monday March 26, 2012 @05:02PM
(#3758634)
Same in multicast DNS which is used in zeroconf:
http://files.multicastdns.org/draft-cheshire-dnsext-multicas...
Search for "random". Cool spec written by Stuart Cheshire of Apple.
Re:7 Years Of YouTube Scalability Lessons In 30 Minutes
by minimax on Monday March 26, 2012 @04:02PM
(#3758382)
I hadn't thought about it in the general case, but I do frequently find myself adding a sleep for PID mod some appropriate constant to the beginning of big distributed batch jobs in order to keep shared resources (NFS, database, etc) from getting hammered all at once.
Re:7 Years Of YouTube Scalability Lessons In 30 Minutes
by sneak on Tuesday March 27, 2012 @12:29AM
(#3760023)
Why is this not done in electronic exchanges to render HFT operations pointless?
Re:7 Years Of YouTube Scalability Lessons In 30 Minutes
by tedunangst on Tuesday March 27, 2012 @01:16AM
(#3760133)
First come, first served is one of the rules that makes the exchanges the exchanges.
This is simple enough when described, but is not a technique I've seen applied much in practice or discussed in the community. I'm wondering if it's something that gets reinvented for all the projects that need it or if it's secret sauce known only in youtube. Regardless, I thought it was pretty insightful.