Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How is Twitter's MySQL database architecture designed? Try your best [closed]

No one knows. And even if you work at Twitter, you probably won't let us know the secret.

So, let us all post our theories on how this communication tool database is designed!

It definitely can't follow the standard replication architecture, right? It's got to do some sharding, partitioning, etc, etc.

Let me know what you think!

like image 614
TIMEX Avatar asked Nov 30 '09 12:11

TIMEX


People also ask

How does Twitter use MySQL?

It has MySQL clusters with thousands of nodes serving millions of queries per second. 1. Acting as the storage node for the distributed data store within Twitter's sharding framework. MySQL storage nodes provide reliability & performance in the overall distributed store.

What is the architecture of MySQL?

MYSQL is a relational database with a layered kind of architecture. The layers of the architecture include a server resource end at the middle, the storage engine at the bottom, and the client-end or query execution end at the top. It's a three-layered architecture database system.

Does twitter use graph database?

Every time you visit LinkedIn and see first-, second-, or third-degree connections, you're getting results from the social networking site's professional network graph built on a graph database. Facebook, Instagram and Twitter all use graph databases and analytics to understand how users relate to each other and ...

What does Twitter use for its backend?

We use a few cache technologies, like Redis and Twemcache, at enormous scale. More specifically, we have a mix of dedicated and multi-tenant Twitter memcached (twemcache) clusters as well as Nighthawk (sharded Redis) clusters.


2 Answers

Twitter uses in memory database and MySQL is just for backup.

This is a diagram that might explain Twitter's architecture: alt text

like image 102
Graviton Avatar answered Sep 29 '22 01:09

Graviton


MySQL is not used for backup as mention in the previous answer but for actually storing the data.

They have developed their own database called FlockDB which uses mySQL as back-end database along with other mechanisms for consistency,indexing etc.

More information about FlockDB and source code here:

https://github.com/twitter/flockdb

But they have optimized their MySQL database schema in a way to perform extremely well with their queries.

More information about the schema here:

http://www.slideshare.net/nkallen/q-con-3770885?from=ss_embed

like image 32
user847988 Avatar answered Sep 29 '22 01:09

user847988