scylladb /seastar

High performance server-side application framework

★ 9,425⑂ 1,727👁 376⑃ 2,324● 1,510▤ 0
C++Apache-2.0Created 2014-08-18seastar.io
TA的项目
+0
日增长
9,425
stars
1,727
forks
376
watchers
2,324
prs
1,510
issues
0
releases

README

Seastar
=======






Seastar is a C++ framework for writing high-performance server applications
on modern multi-core hardware. It powers ScyllaDB,
Redpanda, Ceph Crimson
and other demanding systems.

Seastar is written in modern C++, and supports C++23 and C++26.

To build Seastar and use it in your own project, see BUILD.md.

Philosophy
----------

Server frameworks have traditionally forced a choice between efficiency
and the ability to build complex applications. Seastar aims for both: it
lets you write large, complex servers while extracting the full
performance of the hardware. Three principles make this possible:

 Composable primitives. Everything that can take time is represented
  by the same abstraction, a future: reading from the network, writing to
  disk, waiting on a timer, running a function on another core, or even a
  long CPU-bound computation. These operations compose freely. A single
  coroutine can read a request from a socket, fan out to several disks and
  cores in parallel, wait for the results, and reply, all written as
  straight-line code.

 Move operations to the data, not data to the operations. Seastar
  runs one thread per core (a shard) and partitions memory between them.
  Each piece of data is owned by a single shard; rather than locking the
  data and touching it from whichever core happens to need it, you send the
  operation to the shard that owns the data. There are no locks, no
  contended atomics and no cache-line bouncing on the fast path, so
  performance scales with the number of cores.

 Symmetric architecture. All shards have the same role. There are no
  dedicated network threads, I/O threads or worker pools; every shard runs
  the full stack (networking, storage, application logic, and a
  cooperative scheduler) for its own slice of the data. Adding cores adds
  capacity uniformly, and the whole application is built from one kind of
  component, replicated.

Features
--------

 Futures, promises and coroutines: a complete asynchronous programming
  model. C++ coroutines (co_await) are the recommended way to write new
  code, and interoperate seamlessly with future-returning functions.
 Sharded services: seastar::sharded instantiates a service on
  every core and provides tools to invoke methods on one, some, or all
  shards, and to map-reduce across them.
 Concurrency primitives: semaphores, gates, condition variables,
  pipes, queues, abort sources, parallel loops (parallel_for_each,
  max_concurrent_for_each) and fork/join (coroutine::all).
 CPU scheduler: scheduling groups with configurable shares isolate
  application components from each other.
 Disk I/O scheduler: DMA-based, zero-copy file I/O using io_uring
  or Linux AIO, with a scheduler that models the disk's capabilities (as
  measured by iotune) to keep latency low while maximizing throughput.
 Networking: TCP, UDP, SCTP and Unix domain sockets on top of the
  POSIX stack, or an optional native userspace TCP/IP stack
  running over DPDK

Top issues

Discussions

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON