# Native Async/Coroutine Reads in RocksDB

DevFeed: [Native Async/Coroutine Reads in RocksDB](<https://devfeed.tech/articles/native-async-coroutine-reads-in-rocksdb-22403.md>)

Original publisher: [Read original article](<http://rocksdb.org/blog/2026/08/24/native-coroutine-reads.html>)

Author: Josh Kang

Published: 2026-08-24T00:00:00Z

Content type: article

Language: en

Sources: [RocksDB](<https://devfeed.tech/sources/rocksdb.md>)

Topics: [rocksdb](<https://devfeed.tech/topics/rocksdb.md>), [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [async](<https://devfeed.tech/topics/async.md>), [io\_uring](<https://devfeed.tech/topics/io-uring.md>)

Tags: [adapter](<https://devfeed.tech/tags/adapter.md>), [api](<https://devfeed.tech/tags/api.md>), [apis](<https://devfeed.tech/tags/apis.md>), [application](<https://devfeed.tech/tags/application.md>), [applications](<https://devfeed.tech/tags/applications.md>), [async](<https://devfeed.tech/tags/async.md>), [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [await](<https://devfeed.tech/tags/await.md>), [based](<https://devfeed.tech/tags/based.md>), [benefit](<https://devfeed.tech/tags/benefit.md>), [block](<https://devfeed.tech/tags/block.md>), [blog](<https://devfeed.tech/tags/blog.md>), [but](<https://devfeed.tech/tags/but.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [cache](<https://devfeed.tech/tags/cache.md>), [callback](<https://devfeed.tech/tags/callback.md>), [can](<https://devfeed.tech/tags/can.md>), [column](<https://devfeed.tech/tags/column.md>), [coroutine](<https://devfeed.tech/tags/coroutine.md>), [native](<https://devfeed.tech/tags/native.md>), [rocksdb](<https://devfeed.tech/tags/rocksdb.md>)

## AI overview

RocksDB 11.10.0 adds experimental coroutine-based `Get` and `MultiGet` APIs that can suspend cache-missed reads while storage is busy, letting a small read executor run other requests and maintain storage queue depth. The APIs target throughput for I/O-bound point lookups; they do not make individual device reads faster. `DB::GetAsync` and `DB::MultiGetAsync` complete through callbacks, while `CoroDB::CoGet` and `CoroDB::CoMultiGet` return lazy Folly tasks. Native execution requires a Folly build with `USE_COROUTINES=1` and filesystem support for `GetReadExecutor` and `SubmitReadAsync`; `ReadOptions::async_io` is not required and serves a separate synchronous `MultiGet` path. Callers must keep referenced inputs and outputs alive through completion, and submitted reads cannot currently be cancelled. In the reported benchmark, coroutines used a four-thread executor across 4, 20, 40, and 60 tasks. They could be slower when there was little parallel I/O to expose, but larger `MultiGet` batches let them overtake synchronous reads; gains flattened near CPU saturation. The excerpt gives no numerical throughput results.

## Source excerpt

A point lookup that misses RocksDB's block cache can spend most of its time waiting for storage. The traditional way to keep more reads in flight is to add threads. That works, but each outstanding read parks a thread, carries a stack, and adds context-switching overhead. RocksDB now has experimental asynchronous Get and MultiGet APIs backed by native C++ coroutines. When a read reaches storage, RocksDB can suspend the request, let its read-executor worker run another ready task, and resume the request when the filesystem reports completion. A small executor can therefore maintain more storage queue depth without requiring one blocked application thread per read. These APIs are available in RocksDB 11.10.0. This is primarily a throughput feature for I/O-bound point lookups. It does not make an individual device read faster. Its benefit comes from keeping the device busy and using CPU threads for runnable work. The API surface RocksDB exposes the new read path through two public interfaces: DB::GetAsync and DB::MultiGetAsync return immediately on the native path and report completion through AsyncCallback::OnComplete. CoroDB::CoGet and CoroDB::CoMultiGet return lazy folly::coro::Task objects. CoGet produces a Status; CoMultiGet fills the same per-key values and statuses as synchronous MultiGet. The callback APIs suit applications that do not expose Folly tasks at their boundaries. The CoroDB APIs let coroutine-based callers await RocksDB directly, avoiding an application-side callback-to-Baton adapter and its extra completion handoff. Native execution requires RocksDB to be built with Folly and USE_COROUTINES=1. Neither interface requires ReadOptions::async_io. That flag continues to control the older internal async-I/O optimizations for synchronous MultiGet and iterators. The task APIs are lazy: no read begins until a task is awaited or started. Both interfaces take pointer and reference parameters, so keep the DB, column-family handles, ReadOptions, keys and their