Availability
Edge Gateway management is available in both editions, and this page marks each Enterprise Edition feature.
Each Edge Gateway holds a gRPC connection to AI Studio. The edge keeps serving traffic while no control plane answers.
Connection Settings
Edges connect to the gRPC port of AI Studio (GRPC_PORT). Make sure that firewall rules allow this traffic.Several Control Planes
From v2.3.0, you can give an edge an ordered list of control planes in CONTROL_ENDPOINTS, for example one for each region. All endpoints must be replicas of one AI Studio deployment, with the same GRPC_AUTH_TOKEN and MICROGATEWAY_ENCRYPTION_KEY. The edge shows the endpoint in use in its log (Connected to control plane), in the control_endpoint field of /ready, and in the metric microgateway_control_connected. For the failover order, the failback behavior, and the settings, refer to Configure Edge Gateways.
TLS
AI Studio serves the control connection with TLS, unless GRPC_TLS_INSECURE=true. It uses GRPC_TLS_CERT_PATH and GRPC_TLS_KEY_PATH. The edge verifies the certificate with these settings:
The edge requires TLS 1.2 or later. If the edge cannot read
EDGE_TLS_CA_PATH, or the file has no PEM certificates, the connection stops with an error that names the setting.
Keepalive and Message Size
Keepalive pings find connections that are half open behind a load balancer or NAT:- Edges ping AI Studio every 30 seconds, also when no stream is open. An edge drops a connection if a ping gets no answer in 5 seconds.
- AI Studio accepts pings as often as every 10 seconds, and pings idle edges on the same schedule.
Shared Edge Credentials
All edges authenticate to AI Studio with the same token: EDGE_AUTH_TOKEN on the edge, which matches GRPC_AUTH_TOKEN on AI Studio. The token is not bound to an edge or a namespace. A holder of the token can register as any edge, in any namespace, and get the configuration snapshot of that namespace. The snapshot contains the secrets of the namespace, encrypted with MICROGATEWAY_ENCRYPTION_KEY, which every edge also has. From v2.3.0, this includes the credentials in LLM metadata, such as the AWS keys of a Bedrock LLM, and guardrail provider credentials. Plugin configuration is not encrypted in the snapshot. Do not put a literal credential in plugin configuration. Use a$SECRET/ reference. Refer to Plugin Configuration and Secrets.
Keep the token and MICROGATEWAY_ENCRYPTION_KEY as secrets of the whole deployment. If an attacker gets access to an edge host, do these steps:
- Rotate the edge token (with GRPC_AUTH_TOKEN_NEXT) and
MICROGATEWAY_ENCRYPTION_KEY. - In each namespace that the edge served, rotate the LLM provider keys and the secrets in plugin configuration. Also rotate the tool, data source, embedder, and guardrail provider credentials.
- Revoke the OAuth access tokens issued to MCP clients in those namespaces.
Outage Settings
An edge continues to serve traffic while no control plane answers. It reconnects in the background with exponential backoff, from EDGE_RECONNECT_INTERVAL to a maximum of 30 seconds.Start Without a Control Plane
From v2.3.0, every edge stores the configuration it last applied in its own database, encrypted with a key derived from its ENCRYPTION_KEY. The stored configuration can be as large as a snapshot, up to GRPC_MAX_MESSAGE_SIZE. WithEDGE_START_FROM_LAST_KNOWN_GOOD=true, an edge that starts while no control plane answers waits for EDGE_STARTUP_CONTROL_TIMEOUT. It then starts from the stored configuration, and reports config_source: last_known_good on /ready. When a control plane accepts it, the edge applies the live configuration.
- The edge serves the configuration it last knew. An LLM, App, or filter that you removed in AI Studio works on the edge until it reconnects. For this reason, the option is off by default.
- The edge exits when it has no stored configuration, or when the configuration is for another namespace or another
ENCRYPTION_KEY. It also exits when it was without a control plane for longer thanEDGE_LAST_KNOWN_GOOD_MAX_AGE. - Without full credential sync, the restarted edge cannot validate any App key until a control plane answers. Each request gets
503withRetry-Afterand the codecredential_check_unavailable.EDGE_TOKEN_CACHE_STALE_GRACEdoes not help, because the cache is empty after a restart. - The edge database must survive a restart. On Kubernetes, set
kind: StatefulSetandpersistence.enabled: truein the Edge Gateway chart.- An
emptyDirvolume covers only a container restart. - The chart prints a warning when you set the option without persistence. Refer to Scaling Edge Gateways.
- An
Full Credential Sync (Enterprise)
By default, an edge asks a control plane about a key that it has not seen, and caches the answer forEDGE_TOKEN_CACHE_TTL. While no control plane answers, a key that is not in the cache gets 503 with the code credential_check_unavailable.
From v2.3.0, with EDGE_CREDENTIAL_SYNC=full, AI Studio sends the edge a keyed hash of every App key of its namespace, and of global Apps. AI Studio never sends the keys. The edge stores the list in its database and validates keys from it, also while no control plane answers:
- The edge accepts an active key on the list if its App is active.
- The edge refuses a listed key that is inactive or deleted, or whose App is inactive.
- The edge asks a control plane about a key that is not on the list, as in on-demand mode. An example is a key that a user created a moment ago.
- It also syncs about one second after AI Studio reports a change to a key on the list.
- It gets the full list at least every 15 minutes, and only the changes between those syncs.
- While no control plane answers, a revoked key can work on the edge until the list is older than
EDGE_CREDENTIAL_SYNC_MAX_AGE. - Keep the clocks of the control planes and the database within 30 seconds of each other.
full also logs a warning. Use a persistent volume for the edge database, as for last-known-good.
Analytics During a Control-Plane Outage
Edges send analytics and spend to AI Studio in the analytics pulse. They load the pulse configuration fromPLUGINS_CONFIG_PATH. If AI Studio shows no data for an edge that serves traffic, make sure that PLUGINS_CONFIG_PATH points to an existing analytics pulse configuration. Search the edge logs for startup path and for Failed to send analytics pulse.
From v2.3.0, an edge keeps the analytics that it cannot deliver in a backlog in memory. When a control plane answers, the edge sends the backlog to AI Studio, oldest first. AI Studio stores each pulse once, so it does not count a pulse twice after a failover.
max_backlog_bytesin the analytics pulse configuration sets the size of the backlog. The default is 256 MiB, about 900,000 requests. The Helm chart sets 64 MiB (analyticsPulse.maxBacklogBytes).0turns off the backlog.- When the backlog is full, the edge discards the oldest records and counts them in
microgateway_analytics_pulse_dropped_records_total{reason="over_backlog"}. - The edge loses the whole backlog if it restarts during the outage. Do not restart edges during a control-plane outage.
- Size the memory of the edge for its working set, plus
max_backlog_bytes, plus about 50 MB.