Serverless Runtime / Database Co-Design with Asynchronous I/O
Abstract
Minimizing database access latency is crucial in serverless edge computing for many applications, but databases are predominantly deployed in cloud environments, resulting in costly network round trips. Embedding an in-process database library such as SQLite into the serverless runtime is the holy grail for low-latency database access. However, SQLite's architecture limits concurrency and multitenancy, which is essential for serverless providers, forcing us to rethink the architecture of a database library. We propose re-architecting SQLite to provide asynchronous bytecode instructions for I/O to avoid blocking in the library and decoupling the query and storage engines to facilitate database and serverless runtime co-design. Our preliminary evaluation shows up to a 100x reduction in tail latency, suggesting that our approach is conducive to runtime/database co-design for low latency.
100×
reduction in tail latency (preliminary)
Asynchronous bytecode I/O
I/O becomes an asynchronous bytecode instruction, so the database library never blocks the runtime while it waits on storage.
Decoupled query & storage engines
Separating the query engine from the storage engine lets each one be scheduled and scaled on its own.
Built for multitenancy
An embedded database that many serverless tenants can share safely, without the network round trip to the cloud.
