Follow Us

We use cookies to provide you with a better experience. If you continue to use this site, we'll assume you're happy with this. Alternatively, click here to find out how to manage these cookies

hide cookie message

Twitter ditches MySQL for open source to cope with growth

Twitter down no longer, thanks to Cassandra database

Article comments

Ryan King, an engineer at Twitter, has told the blog MyNoSQL that the social networking company plans to move from MySQL to the Cassandra database for what he called its resilience, scalability and large community of open-source developers.

"We have a lot of data, the growth factor in that data is huge and the rate of growth is accelerating," King said in the interview posted on MyNoSQL.

Twitter currently uses a cluster of MySQL servers with a memcached caching system that "is quickly becoming prohibitively costly (in terms of manpower) to operate. We need a system that can grow in a more automated fashion and be highly available," King told MyNoSQL.

The number of daily tweets has grown more than twenty-fold in the past year, from about two million a day in January, 2009 to nearly 50 million a day last month.

That growth has caused pain, and some devoted users complain loudly whenever Twitter crashes and the so-called 'fail whale' appears.

Twitter has nevertheless improved its uptime significantly in the last 12 months. The site was up 99.72% (down 23 hours, 45 minutes) in the last 12 months, according to Web monitoring firm, Pingdom. In 2008, according to Pingdom, Twitter was down for 84 hours, worst of 15 major social networking sites.

Twitter hopes that deploying the Apache Software Foundation's Cassandra database will improve that record further.

First developed by Facebook to augment its MySQL installation, Cassandra is a lean Java-based data store, that shucks the overhead of conventional relational databases. The technology is similar to that offered in other emerging NoSQL databases like MapReduce and Hadoop,

For skilled programmers, the so-called NoSQL databases can boost performance and scalability, which has made them attractive to the consumer Web world.

Like Facebook and Twitter, Digg is also moving from MySQL , the initial Web 2.0 darling, to Cassandra.

Cisco Systems, hosting provider Rackspace and other firms also use Cassandra. The largest Cassandra instance in production runs 100TB of data using 150 servers, according to the project's website.

The interview was cited in a tweet from King, who has 297,334 Twitter followers.

In the blog intervirew, King said that Twitter looked at a number of options for upgrading its system, including re-architecting MySQL so that it runs better in a cluster (called 'sharding'), and the offerings of several Cassandra NoSQL rivals such as HBase, Voldemort, MongoDB, MemCacheDB, Redis and HyperTable.

King said that test found that Cassandra was more scalable, reliable and easier to manage than the alternatives.

Twitter is "currently moving our largest (and most painful to maintain) table - the statuses table, which contains all tweets and retweets" to Cassandra, he said. "After this we'll start putting some new projects on Cassandra and migrating other tables."

To minimise downtime during the migration, Twitter plans to implement new features by running them in Cassandra alongside MySQL in case any bugs crop up. Once its determined there are no bugs, Twitter will back up MySQL data and then export it to Cassandra in a process that would take about a week, he said.

Only after more testing, will it turn Cassandra on for production and shut down MySQL.

"Our process for rolling out new major infrastructure can be summed up as 'integrate first, then iterate,' King said.



Share:

More from Techworld

More relevant IT news

Comments



Send to a friend

Email this article to a friend or colleague:

PLEASE NOTE: Your name is used only to let the recipient know who sent the story, and in case of transmission error. Both your name and the recipient's name and address will not be used for any other purpose.

Techworld White Papers

Choose – and Choose Wisely – the Right MSP for Your SMB

End users need a technology partner that provides transparency, enables productivity, delivers...

Download Whitepaper

10 Effective Habits of Indispensable IT Departments

It’s no secret that responsibilities are growing while budgets continue to shrink. Download this...

Download Whitepaper

Gartner Magic Quadrant for Enterprise Information Archiving

Enterprise information archiving is contributing to organisational needs for e-discovery and...

Download Whitepaper

Advancing the state of virtualised backups

Dell Software’s vRanger is a veteran of the virtualisation specific backup market. It was the...

Download Whitepaper

Techworld UK - Technology - Business

Innovation, productivity, agility and profit

Watch this on demand webinar which explores IT innovation, managed print services and business agility.

Techworld Mobile Site

Access Techworld's content on the move

Get the latest news, product reviews and downloads on your mobile device with Techworld's mobile site.

Find out more...

From Wow to How : Making mobile and cloud work for you

On demand Biztech Briefing - Learn how to effectively deliver mobile work styles and cloud services together.

Watch now...

Site Map

* *