MySQL: All content tagged as MySQL in NoSQL databases and polyglot persistence
Tuesday, 10 January 2012
MySQL at Twitter: Storing 250mil Tweets Daily
Todd Hoff took the time to disect and extract in a post the interesting bits from Jeremy Cole’s talk[1]Big and Small Data at @Twitter from the O’Reilly MySQL conference:
- MySQL works well enough most of the time that it’s worth using. Twitter values stability over features so they’ve stayed with older releases.
- MySQL doesn’t work for ID generation and graph storage.
- MySQL is used for smaller datasets of < 1.5TB, which is the size of their RAID array, and as a backing store for larger datasets.
- Typical database server config: HP DL380, 72GB RAM, 24 disk RAID10. Good balance of memory and disk.
In my summary of the talk I’ve noted:
- Use MySQL when it works, something else when not - fortunately MySQL often does work
- MySQL is used by Twitter because it’s robust, replication works and it’s easy to use and run
- MySQL doesn’t work good for graphs, auto_increment, replication lag is a problem
- MySQL replication improvements like crash safe multi-threaded slave is what they need
But Twitter is also one of the most prominent use cases of polyglot persistence.While MySQL is an important piece of the Twitter architecture, it is not the only storage or data processing engine.
The following other data solutions get mentioned in Jeremy’s talk:
- Cassandra is used for high velocity writes, and lower velocity reads. The advantage is Cassandra can run on cheaper hardware than MySQL, it can expand easier, and they like schemaless design.
- Hadoop is used to process unstructured and large datasets, hundreds of billions of rows.
- Vertica is being used for analytics and large aggregations and joins so they don’t have to write MapReduce jobs.
Yet that’s not the whole story. Twitter is using Cassandra and Memcached for real-time URL fetchers and they also experimented with using Gizzard for Redis. After buying BackType, Twitter got and then open sourced Storm, a Hadoop-like real-time data processing tool. And who knows what’s in the Twitter labs right now.
I’m embedding below Jeremy Cole’s “Big and Small Data at @Twitter”:
Thursday, 5 January 2012
Database Sharding Using a Proxy
ScaleBase’s Liran Zelkha is making the case for database sharding using a proxy:
First and foremost, since the sharding logic is not embedded inside the application, third party applications can be used, be it MySQL Workbench, MySQL command line interface or any other third party product. This translates to a huge saving in the day-to-day costs of both developers and system administrators.
Compare ScaleBase’s proxy-based sharding:

with MongoDB’s sharding:
Another example would be the Hadoop HDFS NodeName which provides somehow similar functionality.
Original title and link: Database Sharding Using a Proxy (©myNoSQL)
via: http://www.scalebase.com/making-the-case-for-sharding-using-a-database-proxy/
Wednesday, 14 December 2011
MySQL MEMORY as Poor Man’s Memcached Replacement
Q: Copy MySQL to RAM as a poor man’s memcached replacement?
A: Use the the MEMORY storage engine on a read only slave to do your reads from, is exactly what you really want and a sane setup. Forget “dumping it to disk” (?!) or other strange things.
You can even put the slave as another instance on your existing server if you can’t afford to setup a dedicated slave, but properly tuning the MySQL parameters for mostly read workloads will bring a significant performance enhancement too!
Jiminy
Original title and link: MySQL MEMORY as Poor Man’s Memcached Replacement (©myNoSQL)
Sunday, 11 December 2011
Facebook: There Are No Published Cases of NoSQL Databases Operating at the Scale of Facebook’s MySQL Database
Joe Maguire referring to the Facebook talk embedded below MySQL and HBase:
if Facebook doesn’t need NoSQL, who does?
My answer: many of those that cannot employ a specialized team to hack the hell out of MySQL to make it work at that scale.
On the flipside, many other companies don’t have the time or engineering power to grow their product together with a NoSQL database.
via: http://josephmaguire.blogspot.com/2011/12/facebook-there-are-no-published-cases.html
Friday, 9 December 2011
MySQL Sharding vs MySQL Cluster
Q: Considering performance only, can a MySQL Cluster beat a custom data sharding MySQL solution?
A: I would say that MySQL Cluster could achieve higher throughput/host than sharded MySQL+InnoDB provided that :
- Queries are simple
- All data fits in-memory
In terms of latency, MySQL Cluster should have more stable latency than sharded MySQL. Actual latencies for purely in-memory data could be similar. As queries become more complex, and data is stored on disk, the performance comparison becomes more confusing.
Make sure you read the complete answer as it covers some more MySQL Sharding vs MySQL Cluster pros and cons.
Original title and link: MySQL Sharding vs MySQL Cluster (©myNoSQL)
Monday, 5 December 2011
MongoDB, Data Modeling, and Adoption
Micheal Shallop describes in this post how he “built and re-buit” a geospatial table, replacing several tables in MySQL with MongoDB:
The mongo geospatial repository will be replacing several tables in the legacy mySQL system – as you may know, mongodb comes with full geospatial support so executing queries against a collection (table) built in this manner is shocking in terms of it’s response speeds — especially when you compare those speeds to the traditional mySQL algorithms for extracting geo-points based on distance ranges for lat/lon coordinates. The tl;dr for this paragraph is: no more hideous trigonometric mySQL queries!
But what actually picked my attention was this paragraph:
What I learned in this exercise was that the key to architecting a mongo collection requires you to re-think how data is stored. Mongo stores data as a collection of documents. The key to successful thinking, at least in terms of mongo storage, is denormalization of your data objects.
This made me realize that MongoDB adoption is benefiting hugely from the fact that its data model and querying are the closest to the relational databases, neither requiring a radical mindshift from developers that have at least once touched a database. It is like knowing a programming language and learning a 2nd one that follows almost the same paradigms.
The same cannot be said about key-value stores, multi-dimensional maps, MapReduce algorithms, or graph databases. Any of these would require one to dismiss pretty much everything learned in the relational model and completely remodel the world. It’s a tougher job, but when used right the reward pays off.
Original title and link: MongoDB, Data Modeling, and Adoption (©myNoSQL)
Thursday, 1 December 2011
Typekit Architecture Includes Redis, MongoDB, and MySQL
As revealed by Ryan Carver in a web pulp TV interview:
- Besides MySQL, the stack also contains Redis and MongoDB.
- Redis is used for stashing Resque data, Vanity metrics, etc.
- MongoDB is used for storing CDN logs, basic analytics data, traffic-tracking data, etc.
- Typekit has a unique type of revenue-share deal with its Type foundry partners, distributing revenues based on the popularity/usage of font faces.
- MongoDB is particularly used for such usage-based data collection and calculation along with its built-in MapReduce framework for reporting.
- Ryan thinks on-the-fly-report-generation is technically very much possible with MapReduce.
About Typekit infrastructure:
- Ryan says Typekit currently has about a dozen servers in total, hosted on Slicehost.
- Typekit plans to shift to an EC2 environment in near future because of the easy scaling and flexibility of EC2.
- They are currently preparing a cloud formation with Chef, rebuilding Typekit’s operations infrastructure.
Now go watch the whole interview.
Original title and link: Typekit Architecture Includes Redis, MongoDB, and MySQL (©myNoSQL)
Wednesday, 30 November 2011
DataSift Using MySQL, HBase, Memcached to Deal With Twitter Firehose
A new great article from Todd Hoff dissecting the DataSift architecture:

In terms of data store, DataSift architecture includes:
- MySQL (Percona server) on SSD drives
- HBase cluster (currently, ~30 hadoop nodes, 400TB of storage)
- Memcached (cache)
- Redis (still used for some internal queues, but probably going to be dismissed soon)
Leave whatever you were doing and go read it now.
Original title and link: DataSift Using MySQL, HBase, Memcached to Deal With Twitter Firehose (©myNoSQL)
Monday, 3 October 2011
The Story of Etsy's Architecture
Ars Technica’s Sean Gallagher summarizes a presentation given at Surge conference covering the evolution of Etsy’s architecture from a centralized PostgreSQL stored procedures based solution to a sharded MySQL and going through a failed service oriented-like architecture:
And the team started to shift feature by feature away from a semi-monolithic Postgres back-end to sharded MySQL databases. “It’s a battle-tested approach,” Snyder said. “Flickr is using it on an enormous scale. It scales horizontally, basically, to near infinity, and there’s no single point of failure—it’s all master to master replication.”
Original title and link: The Story of Etsy’s Architecture (©myNoSQL)
Monday, 18 July 2011
Time Lines and News Streams: Neo4j Is 377 Times Faster Than MySQL
In my use case neo4j outperformed MySQL by a factor of 377 ! That is more than two magnitudes). As known one part of my PhD thesis is to create a social newsstream application around my social networking site metalcon.de. It is very obvious that a graph structure for social newsstreams are very natural: You go to a user. Travers to all his friends or objects of interest and then traverse one step deeper to the newly created content items. A problem with this kind of application is the sorting by Time or relvance of the content items. But before I discuss those problems I just want to present another comparission between MySQL and neo4j.
This is wrong on so many levels. Scratch that. It’s even worse than an apples-to-oranges comparison.
Original title and link: Time Lines and News Streams: Neo4j Is 377 Times Faster Than MySQL (©myNoSQL)
via: http://www.rene-pickhardt.de/time-lines-and-news-streams-neo4j-is-377-times-faster-than-mysql/
Tuesday, 12 July 2011
Enterprise Big Data Stack vs Open Source Big Data Stack
Goldmacher estimated that YouTube consumption—user uploads of 48 hours of video a minute and 3 billion videos a day along with roughly 45 petabytes of viewed videos a day—would require at least 9 full-rack Exadata machines at $1.5 million each. There would be at least 18 Exadata machines to handle spikes. Those machines would add up to 14 Exalogic devices to serve data at $1.1 million per system. The software stack under Oracle would include WebLogic middleware, Oracle databases, Exadata optimized storage and Oracle as operating system. The open source comparison included JBoss middleware, MySQL, Hadoop and Red Hat Enterprise Linux as the OS.


Credit Peter Goldmacher (Cowen & Co. analyst)
Two comments (the only I have):
- what advantages would the enterprise stack offer to justify a 5x cost?
- in case all numbers are completely wrong, what’s the advantage of the enterprise stack?
Original title and link: Enterprise Big Data Stack vs Open Source Big Data Stack (©myNoSQL)
Most Popular Articles
- Translate SQL to MongoDB MapReduce
- Tutorial: Getting Started With Cassandra
- CouchDB vs MongoDB: An attempt for a More Informed Comparison
- Cassandra @ Twitter: An Interview with Ryan King
- A Couple of Nice GUI Tools for MongoDB
- NoSQL benchmarks and performance evaluations
- Ehcache: Distributed Cache or NoSQL Store?
- Document Databases Compared: CouchDB, MongoDB, RavenDB
- Quick Review of Existing Graph Databases
- NoSQL Data Modeling