Serdar Yegulalp
Senior Writer

Facebook rocks an open source storage engine for MySQL

news analysis
Sep 1, 20162 mins

Facebook's speedy and compact RocksDB key-value store for MySQL is now open source, but watch out for its limited feature set

Facebook’s RocksDB key-value store has found its way into a number of third-party products, like the Apache Flink big-data processing framework and MongoDB. Now it’s taking up residence in a familiar neighborhood: MySQL.

MyRocks implements RocksDB as an open source storage engine for MySQL. Now any MySQL application — or MySQL-compatible query — can use a high-speed storage system that’s been optimized to work well with the peculiarities of flash storage.

In a blog post from yesterday, Facebook database engineer Yoshinori Matsunobu discussed the advantages of pairing up the two. MySQL is well-understood and highly automatable; data placed in it can be easily accessed, backed up, partitioned, and replicated. By making RocksDB into a MySQL storage engine, RocksDB gains all of those functionalities automatically.

In Facebook’s estimation, RocksDB has several functional advantages over MySQL’s default InnoDB storage engine. Data in RocksDB uses less overall I/O per read or update, so it puts less strain on flash storage’s write endurance. It can also be more readily compressed, defragmented, replicated, and accessed.

Before you rip out InnoDB and replace it with MyRocks on your own MySQL deployments, hold your horses. For one, there’s a lot MyRocks can’t do yet — it doesn’t support foreign keys, for instance, which is likely to be a deal-killer for many kinds of database applications. Full-text indexing isn’t supported either.

Another possible issue: MyRocks is currently available only via a fork of MySQL 5.6. It’s not clear that the MyRocks storage engine can be installed by itself in an existing, conventional MySQL 5.6 deployment. The fact that MyRocks is open source eases its implementation, but it’s not guaranteed.

It’s not immediately apparent if Facebook needs any of the above features — Facebook isn’t planning to replace all of its InnoDB instances with MyRocks anyway. “InnoDB is a long-standing standard MySQL storage engine and has many different use cases,” said Matsunobu. “There are [many] critical database tiers [inside Facebook], and we’ll continue to use InnoDB for most of them.”

Serdar Yegulalp

Serdar Yegulalp is a senior writer at InfoWorld. A veteran technology journalist, Serdar has been writing about computers, operating systems, databases, programming, and other information technology topics for 30 years. Before joining InfoWorld in 2013, Serdar wrote for Windows Magazine, InformationWeek, Byte, and a slew of other publications. At InfoWorld, Serdar has covered software development, devops, containerization, machine learning, and artificial intelligence, winning several B2B journalism awards including a 2024 Neal Award and a 2025 Azbee Award for best instructional content and best how-to article, respectively. He currently focuses on software development tools and technologies and major programming languages including Python, Rust, Go, Zig, and Wasm. Tune into his weekly Dev with Serdar videos for programming tips and techniques and close looks at programming libraries and tools.

More from this author