Database / ScyllaDB Interview questions
Explain the internal working of the Seastar future-promise model?
Seastar's concurrency model is built around futures (a placeholder for a value that will eventually be ready) and promises (the producer side that eventually fulfills that value), composed together instead of using blocking calls or OS-level thread synchronization.
Each core runs a single-threaded reactor loop that polls for completed I/O events and dispatches ready continuations, so nothing on that core ever blocks waiting for disk or network; instead, code chains .then() continuations onto a future, and the reactor invokes them once the underlying operation completes. Because everything on a given core runs cooperatively on one thread, there's no need for locks to protect that core's own data structures - the only synchronization required is for the deliberately explicit, asynchronous messages sent between cores. This is what allows ScyllaDB to scale near-linearly with core count without traditional multi-threaded contention.
More Related questions...