pub enum Plane {
Both,
Data,
Credential,
}Expand description
Build the data-plane router (/v1/*), with EdgeState baked in.
This is the reusable half: the self-host binary adds its own health routes
around it (see crate::run); the hosted gateway merges it under its auth +
metering middleware alongside its control-plane routes. It deliberately does
NOT register /health/*, so a host app can own health without colliding.
§What this router does NOT include
No transport-level protection is attached here — not the request-body cap,
the request timeout, the credential-header redaction, or tracing. An
embedder must apply them, and crate::harden does exactly that.
The body cap is the one most easily missed: crate::EdgeConfig exposes
max_body_bytes as a validated knob, which makes it reasonable to assume
the router already honours it. It does not.
Which planes a given process serves.
One binary, deployed twice. The data plane carries every tenant’s memory traffic; the credential plane is the only place a plaintext provider key exists in memory, and it sits on the LLM path with a completely different latency profile.
Running both in one process is supported, and is the default — standing up two deployments just to try BYOK would be absurd. Production should split them: it keeps every tenant’s keys out of the busiest process and lets the two scale on their own shapes.
Variants§
Both
Memory verbs plus credentials and the broker. The default.
Data
Memory verbs only. No key material is reachable in this process.
Credential
BYOK credential management and the broker only.