Efficient and Consistent Time-to-Live (TTL) Implementation in MyRocks at Meta

May 27-29, 2026 • Computer History Museum, CaliforniaDate, time, and room will be announced soon.
Time-to-Live (TTL) functionality is a crucial requirement for modern data storage systems, enabling automatic expiration and deletion of obsolete data. At Meta, the MyRocks storage engine—a RocksDB-based engine optimized for write-heavy workloads—plays a foundational role for diverse use cases, many of which require reliable and performant TTL support. Some examples of use cases that use TTLs are features that handle sensitive data, time series and log data, and use cases that model queues using MySQL tables. In this talk, we present our approach to implementing TTL in MyRocks. We detail the design and architectural decisions to make the transition for users seamless, discuss the challenges related to maintaining transactional consistency (on both primary and replicas).
Speaker

I’m part of the database team at Meta, where we build MyRocks—a MySQL server using RocksDB as the storage engine. My work primarily focuses on replication and transaction management.

