вторник, 3 июля 2012 г.

Twitter: Ruby + MySQL -> Java (Netty, Lucene, Zookeeper, Guice)

Twitter Search is Now 3x Faster

"In the spring of 2010, the search team at Twitter started to rewrite our search engine in order to serve our ever-growing traffic, improve the end-user latency and availability of our service, and enable rapid development of new search features. As part of the effort, we launched a new real-time search engine, changing our back-end from MySQL to a real-time version of Lucene. Last week, we launched a replacement for our Ruby-on-Rails front-end: a Java server we call Blender. We are pleased to announce that this change has produced a 3x drop in search latencies and will enable us to rapidly iterate on search features in the coming months."

"Blender is a Thrift and HTTP service built on Netty ..."

"We chose Netty over some of its other competitors, like Mina and Jetty, because it has a cleaner API, better documentation and, more importantly, because several other projects at Twitter are using this framework."

"We are using the twitter commons library (recently open-sourced!) to provide connection-pool management, load-balancing, and dead host detection."