focused, online display advertiser. ... which means we put ads on your web pages ... Wrote and maintain em- mongo, a ruby eventmachine MongoDB* driver. What's this Ruby guy doing here?
and receives about 2.5 Billion http requests Generates around 500 Gb of log data Dozens of partners with strict SLAs Hundreds of active campaigns driving hundreds of thousands of dollars in revenue
have the potential to respond in more than 10 ms 30k requests a second ... is a lot Sub 10 ms response times* ... is not a lot Every time we don't respond to a request quickly enough it costs us money. Errors cascade very quickly at this scale
ms 8 ms Browser 16 ms 24 ms 11 ms 4 ms Single path of execution Easy to test Easy to debug Clean code Trickle down latency IO blocks execution !@?$ Your Ad Could Be Here!
ms 1 ms 8 ms Browser 16 ms 9 ms 1 ms 9 ms Browser 10 ms 11 ms 4 ms 5 ms Callbacks Can't block the event loop Harder to test Nasty to debug Web scale !!! IO is "free"
complexity warranted? • How can one mitigate the complexity of callbacks and events? • Javascript "all the way down" a good thing? • Easier than threads? • Using evented / async models in other programming languages (Ruby, Python, etc) • V8 is awesome. • Clojure (we are at Roomkey...)