Repository navigation
Run the control plane next to its database and skip the session JWT header - #286
Merged
Merged
Conversation
…eader Every control-plane request runs several database queries in a row. From the Cloudflare location nearest the visitor, each one costs 20 to 30 ms. A hosted installation can now name its database's cloud region with placementRegion, so the control plane runs next to the database. The JWT plugin also signed a session JWT for the set-auth-jwt header on every session lookup and read the signing keys from the database each time. Nothing reads that header. The OAuth provider still signs its tokens with the plugin's keys.
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
widefleet-docs | 0a9d3d4 | Nov 22 2026, 12:10 PM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Each control-plane request runs several database queries in a row. On a Cloudflare installation the Worker runs in the location nearest the visitor, so every query crosses the distance to the database: Cloudflare's Hyperdrive docs give 20–30 ms per query without placement and 1–3 ms with it. A remote query such as
getAppsmakes 7 queries: session, user, signing keys, membership, then the app list in a transaction. Its server time on a hosted installation is about 230 ms.Changes
placementRegion, for exampleaws:eu-central-1. The control plane is then deployed withplacement: { region }and runs next to the database. Static assets are still served from the location nearest the visitor. App runtime, builder and documenter Workers are unchanged.set-auth-jwtheader on every session lookup, which read the signing keys from the database each time. Nothing reads that header, sodisableSettingJwtHeaderturns it off. The OAuth provider for the CLI and MCP clients still signs its tokens with the plugin's keys.Validation
pnpm checkhosted-installation.test.ts, including a new test forplacementRegionmcp-login-runtime.test.ts,auth.integration.test.ts,auth-cli.integration.test.tsDocumentation: #287 (draft until a release includes this change).


Confidence Score: 5/5 
The PR appears safe to merge; no actionable issues were found.Summary
Adds optional
placementRegionto hosted installations and disables the unused session JWT response header.Reviews (1) · Last reviewed commit: "Run the control plane next to its databa..." · Reviewed by Greptile