Expand description
Ursula HTTP server: axum router, request handlers, response rendering,
plus the typed-config bootstrap constructors used by the ursula binary.
Module map:
- [
render]: response builders, header helpers, SSE/multipart rendering. - [
bootstrap]: typed-configspawn_*_runtimeconstructors and cold-flush worker. server: command arguments and the long-running server service entrypoint.
Modules§
Structs§
- Client
Write Leader Router - Resolves the current leader of a raft group to a client-reachable base URL
so a write/read that lands on a non-leader can be answered with a 307
redirect.
peersmaps raft node id to that node’s configured peer URL:server.listenwhenserver.cluster_listenis unset, or the separateserver.cluster_listenaddress when it is set. Peer URLs are also used as HTTP leader-redirect targets, so clients and gateways must be able to reach them too. - Http
State - Ingress
Admission - Client-plane ingress admission. The primary control is a process-wide
in-flight write-body byte budget: a request must reserve its body bytes
before axum drains the body into
Bytes, and the reservation lives until the response is produced. This is the layer that turns memory pressure into backpressure at the HTTP edge. - Node
Memory Monitor - Process-wide RSS monitor. It reports RSS in
/__ursula/metricsand exits when the last-resort abort cap is exceeded. It does not reject writes; ingress byte admission is the write-path memory control. - Spawned
Runtime - Result of spawning a runtime.
- System
Wall Clock
Enums§
- Persistence
- Persistence strategy for the runtime.
- Topology
- Deployment topology.
Traits§
Functions§
- admin_
router - Admin-plane routes: the mutating operator surface (raft group operations,
maintenance drain, cold-flush trigger) plus read-only metrics so operator
tooling works over a single tunnel. Production binds this to
server.admin_listen(loopback by default) — nodes expose no cluster-mutation endpoints on the client or cluster planes. - client_
router_ with_ admission - cluster_
router_ from_ state - Cluster-plane routes: inter-node gRPC carrying Raft RPCs, snapshot transfer, and leader-read checks. In a dual-listener deployment these bind to the private (VPC) interface so chaos applied to the public face never disrupts consensus.
- router
- router_
with_ http_ state - Convenience wrapper that merges the client, cluster, and admin planes into a single router. Used by in-process tests and the madsim harness, where per-plane listeners would only add noise.
- router_
with_ raft_ registry - router_
with_ static_ raft_ cluster - router_
with_ static_ raft_ cluster_ topology - spawn_
runtime - Spawn a runtime from a typed
ursula_config::UrsulaConfig.