Latency
p50, p95, and p99 for queue wait, prefill, first token, and inter-token interval. Alerts can fire on any percentile without a separate metrics pipeline.
Neuraflow separates the control plane from the data plane. Configuration and keys live in the control plane; inference traffic goes directly to the GPU pool that holds the model. Nothing about a request depends on a single load balancer keeping state.
The client connects to the nearest anycast edge. The edge terminates TLS 1.3, validates the API key against a short-lived cache, attaches a request ID, and forwards over a private backbone link. Key validation is cached for 30 seconds; a revoked key is rejected on the next cache refresh, never later than 30 seconds.
The region router receives a lightweight envelope, not the request body. It ranks six regions by recent pool latency, queue depth, and free GPU memory, then forwards to the best region whose admission controller accepts the request within 60 ms. If no region accepts in time, the router returns a 429 with Retry-After: 1 rather than holding the connection open indefinitely.
x-neuraflow-request-id, x-neuraflow-region, x-neuraflow-key-id, x-neuraflow-queue-ms
Bodies up to 1 MB are buffered at the edge. Streaming responses are proxied with backpressure; the edge never waits for the full completion before forwarding the first token.
One retry per request, only on connection errors or 503. A 4xx response is returned unchanged and is never retried, because the request is already malformed or unauthorized.
24 GB, 48 GB, and 80 GB GPU nodes, one to eight GPUs per node. Pools are pinned to a single NUMA domain where the topology allows it.
A model replica is placed on a node with its weights in page cache. The scheduler reserves 2 GB of headroom per GPU for the runtime and KV cache growth.
Each project runs in its own container and network namespace. GPUs are not shared between projects unless a pool is explicitly configured as shared.
The scheduler is a two-level allocator. At the node level it tracks GPU memory, KV cache blocks, and the measured decode throughput of each loaded model. At the request level it uses continuous batching with a per-replica cap of 8,192 batch tokens. Requests that would exceed the cap wait in a bounded queue instead of degrading the latency of work already in flight.
When a replica is selected, its runtime receives a preallocated KV cache region. That avoids allocator contention during the first tokens and keeps p99 stable when the queue is uneven. The scheduler rejects a request as soon as the projected wait exceeds the endpoint's configured maximum, so clients see a fast 429 instead of a timeout.
Host CPU is a poor proxy for inference load because token generation is GPU-bound and bursts arrive faster than a CPU average can move. The autoscaler therefore reads three signals every 2 seconds: pending request count, tokens currently in flight, and p95 queue wait. A scale-out starts when queue depth stays above 2 for 6 seconds or p95 wait exceeds 80 ms for 30 seconds.
Scale-in is deliberately slower. A replica is eligible after 5 minutes below 30% GPU utilization, and the pool then waits a 180-second stabilization window before removing it. This keeps a burst from triggering a remove-and-readd cycle that costs more than the idle GPU time it saves.
{
"name": "rank-prod",
"model": "reranker-3b",
"gpu_class": "24gb",
"regions": ["fra-1", "iad-1"],
"min_replicas": 2,
"max_replicas": 14,
"autoscale": {
"metric": "queue_depth",
"target": 2,
"window_s": 6,
"scale_out_cooldown_s": 6,
"scale_in_cooldown_s": 60
},
"scale_to_zero": false,
"max_queue_s": 60,
"batch_tokens": 8192,
"spend_cap_usd": 2400
}
Hot models stay resident. The runtime keeps weights on local NVMe and in page cache, so a scale-out replica does not download a model from object storage. Cold start is measured from container start to first generated token, not from the moment a request arrives at the queue.
| Scenario | Measured | What happens |
|---|---|---|
| Scale-out, image and weights cached | 1.2 s | Container starts, weights map from NVMe, GPU context warms. |
| Scale-out, 13B weights cached | 4.8 s | Sharded weights load across two GPUs before admission opens. |
| New node, no cached weights | 11–18 s | Weights are fetched from the registry and verified by digest. |
| First request to a scaled-to-zero endpoint | 1.3 s | Request holds in a restore queue while the warm pool resumes. |
When scale-to-zero is enabled, the first requests wait in a dedicated restore queue. They do not occupy a GPU slot until the model is resident, which keeps other endpoints on the same node unaffected.
Every weight file is verified against its content digest before the runtime opens it. A failed check removes the cached copy and retries the fetch once.
A custom image must answer GET /health with 200 within 3 seconds of start. The scheduler will not route traffic until that probe passes twice in a row.
Metrics are collected per replica at 10-second resolution and rolled up per endpoint, region, and key. Request traces retain the edge decision, queue wait, prefill time, time to first token, decode rate, and the replica ID. Traces are searchable by request ID for 30 days; hourly metric rollups remain for 13 months.
p50, p95, and p99 for queue wait, prefill, first token, and inter-token interval. Alerts can fire on any percentile without a separate metrics pipeline.
GPU memory held by weights and KV cache, active sequences, batch token count, and the number of requests rejected by admission control.
Error rate by status code and route, stream completion rate, and the count of outputs that hit the token limit. Usage is attributed to the API key that signed the request.
Endpoints are reachable in fra-1, ams-1, iad-1, sjc-1, sin-1, and syd-1. Anycast keeps the client connection pointed at the nearest healthy edge. If a pool fails its health probe three times, the router removes it from selection in under 8 seconds and reissues in-flight work to a healthy region when the request is safe to retry.
Draining is explicit: a replica marked for maintenance stops accepting new requests, finishes sequences for up to 30 seconds, and then exits. Clients with long-lived streams receive a final event with a completion reason instead of a truncated connection.
| Control | Setting |
|---|---|
| Health probe | 2 s interval, 3 failures |
| Regional removal | < 8 s |
| Drain window | 30 s |
| Retry budget | 1 attempt |
| Trace retention | 30 days |
| Metric rollup retention | 13 months |
Audit logs, per-key scopes, request-level trace retention, and customer-controlled key rotation are available on every plan.
Deploy one endpoint and compare queue wait, first-token latency, and spend against the numbers on this page.