🏛️ Stateless C++ Services
Home Chapters Examples Diagrams Bibliography GitHub ↗
  1. Home
  2. Process-Scope Discipline
Part 3 2 chapters

Process-Scope Discipline

What legitimately lives for the process lifetime — the State Architecture Table and the main()-owned wiring pattern — and threading and concurrency as the cross-cutting axis that interacts with statelessness in non-obvious ways.

Doc 4

Process-scoped state that's still stateless

Not all state is request-scoped. The State Architecture Table is introduced here. TracerProvider, gRPC channels, connection pools, prepared-statement caches, PMR upstream resources, in-process caches, parsed configuration. The main()-owned wiring pattern. OS container limits as the budget for sizing.

Read →
Doc 5

Threading and concurrency in a stateless service

The cross-cutting concern that interacts with statelessness in non-obvious ways. TLS as process-scoped (CorrelationGuard), stack-based vs stackless concurrency, gRPC's threading model, inter-thread communication, CPU limits (CFS quota mechanics, throttling tail latency, allocator arena counts under cgroup limits), std::stop_token cooperative cancellation.

Read →
← Previous part Request-Scope Discipline Next part → Operational Concerns
Stateless C++ Services
Tutorial content: CC BY 4.0. Sample code: Apache 2.0.
Source on GitHub ↗  ·  File an issue ↗