section_path: Technology/Implementation
section_name: Implementation
paragraph_text: Implementation
  
  Twitter relies on open-source software. The Twitter Web interface uses the Ruby on Rails framework, deployed on a performance enhanced Ruby Enterprise Edition implementation of Ruby.
  
  In the early days of Twitter, tweets were stored in MySQL databases that were temporally sharded (large databases were split based on time of posting). After the huge volume of tweets coming in caused problems reading from and writing to these databases, the company decided that the system needed re-engineering.
  
  From Spring 2007 to 2008, the messages were handled by a Ruby persistent queue server called Starling. Since 2009, implementation has been gradually replaced with software written in Scala. The switch from Ruby to Scala and the JVM has given Twitter a performance boost from 200 to 300 requests per second per host to around 10,000–20,000 requests per second per host. This boost was greater than the 10x improvement that Twitter's engineers envisioned when starting the switch. The continued development of Twitter has also involved a switch from monolithic development of a single app to an architecture where different services are built independently and joined through remote procedure calls.
  
  As of April 6, 2011, Twitter engineers confirmed that they had switched away from their Ruby on Rails search stack to a Java server they call Blender. Individual tweets are registered under unique IDs called snowflakes, and geolocation data is added using 'Rockdove'. The URL shortener t.co then checks for a spam link and shortens the URL. Next, the tweets are stored in a MySQL database using Gizzard, and the user receives an acknowledgement that the tweets were sent. Tweets are then sent to search engines via the Firehose API. The process is managed by FlockDB and takes an average of 350 ms.
  
  On August 16, 2013, Raffi Krikorian, Twitter's vice president of platform engineering, shared in a blog post that the company's infrastructure handled almost 143,000 tweets per second during that week, setting a new record. Krikorian explained that Twitter achieved this record by blending its homegrown and open source technologies.
  
  X Money, a payment system, is under development.