Twitter switches to Java for its search engine


Java scored twice at Twitter over the last few weeks. First, Twitter switched the back-end from MySQL to Lucene (a search engine library written in Java), and then the front-end from Ruby-on-Rails to Blender (a Java server).
The improvements in latency (3x drop) and workload capacity (x10 increase) are quite dramatic. Some quotes:
  • “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.”
  • “…our 95th percentile latencies were reduced by 3x from 800ms to 250ms and CPU load on our front-end servers was cut in half. We now have the capacity to serve 10x the number of requests per machine. This means we can support the same number of requests with fewer servers, reducing our front-end service costs by an order-of-magnitude”
  • “In the next phase of our deploy, we will eliminate Ruby on Rails entirely, connecting users directly to Blender and potentially reducing latencies even further.”