This page explains how to size Spooky nodes and how to think about safe concurrency. Exact numbers must be validated against your own workload.
Inputs That Matter Most
Safe capacity depends primarily on:
- concurrent downstream connections
- concurrent in-flight requests
- backend latency distribution
- request and response body sizes
- percentage of long-lived or streaming traffic
- number of distinct routes, upstreams, and backends
- enabled logging, metrics, tracing, auth, quota, retry, and hedge policy
Start With a Traffic Model
Before tuning limits, write down:
- expected steady-state requests per second
- expected peak requests per second
- expected concurrent connections
- longest common request and response durations
- largest realistic request and response sizes
- backend p95 and p99 latency under load
Without that model, capacity tuning becomes guesswork.
CPU Guidance
Use more CPU when you expect:
- high QUIC handshake churn
- heavy TLS activity
- many active concurrent streams
- many routes with latency-sensitive traffic
- aggressive retry, hedge, auth, or quota evaluation volume
Reasonable starting points:
- small controlled rollout: 2 to 4 cores
- serious production node: 4 to 8 cores
- higher-throughput nodes: scale upward only after workload validation
Memory Guidance
Memory use is driven mainly by:
- active connection count
- inflight request count
- buffered request bodies
- buffered or prebuffered response bodies
- long-lived streams during drain or overload
- body-size caps and queue caps
Do not size memory from idle behavior or smoke tests. Validate under:
- peak connection churn
- slow backends
- large bodies
- streaming traffic
- overload and brownout conditions
Concurrency Guidance
The important question is not only "how many requests can the node accept" but also "how many should it admit before self-protection is healthier than continuing."
Treat these as protection boundaries, not throughput goals:
global_inflight_limitper_upstream_inflight_limitper_backend_inflight_limitmax_active_connectionsrequest_buffer_global_cap_bytes- body-size limits
If you increase them, confirm:
- node memory still has headroom
- backend latency does not collapse
- overload recovery is still fast
- tail latency does not become unacceptable
Worker And Shard Guidance
- start with one worker per core
- add packet sharding only when packet-rate pressure or worker imbalance justifies it
- use
SO_REUSEPORTstyle multi-worker ingress as the baseline deployment model - enable worker pinning only after testing on the production host class
When 503s Appear
If you see 503s, do not immediately widen limits.
First decide whether the cause is:
- overload shedding
- backend timeout or backend failure
- quota backend failure under fail-closed policy
- mis-sized concurrency limits
- routing concentration on too few backends
The answer determines whether you should add capacity, fix backends, adjust policy, or change limits.
Recommended Capacity Process
- Establish a known-good baseline config.
- Benchmark and soak-test from that baseline.
- Increase one high-impact limit at a time.
- Record latency, memory, shed rate, and backend health effects.
- Re-run validation after enabling more advanced features such as quota, retries, hedging, or heavier auth paths.