Asynchronous MySQL: How Facebook Queries Databases

Developing Applications
2 April 11:30AM - 12:20PM @ Ballroom F

Experience level: 
Beginner
Duration: 
50 minutes conference
Traditionally, querying MySQL has meant blocking while waiting to connect, blocking to send a query, and blocking to receive it. This works, to a point, but as systems begin to grow, waiting on each database sequentially ends up having a significant impact on overall system performance and latency. Facebook has tackled this issue by making a non-blocking (aka Asynchronous) MySQL client, which we have open sourced as part of our MySQL releases. Extending the existing C client, our work supports standard asynchronous querying from our PHP implementation, HipHop, as well as native C, C++, and Python without the overhead or complications of threads. Compatible with standard libraries such as libevent in C, our client extensions are usable in a wide variety of environments while still using standard the MySQL interface. This talk will discuss the benefits of asynchronous APIs, how to build large scale systems built upon them, and insights into how Facebook has improved end-user performance and internal tooling by utilizing asynchronous APIs. We'll also discuss the structure of our APIs and what we've learned in handling the query load for over a billion users.


Speakers

Software Engineer, Facebook, Inc.
Biography: 
Chip has spent the past eight years working on MySQL and related database technologies. Now the tech lead for the MySQL client team at Facebook, Chip spends most of his time interacting with databases from a variety of languages and making them faster, easier, and more reliable. Prior to Facebook, he spent many years at Google where he also spent much time inside of MySQL, and before that, at Red Hat.

Slides