Repository navigation
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 | 1714e9a | Nov 22 2026, 12:10 PM |
tnkuehne
added a commit
that referenced
this pull request
Nov 22, 2026
…eader (#286) 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 `getApps` makes 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 - **Placement:** the hosted installation profile accepts `placementRegion`, for example `aws:eu-central-1`. The control plane is then deployed with `placement: { 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. - **Session JWT header:** the JWT plugin signed a JWT for the `set-auth-jwt` header on every session lookup, which read the signing keys from the database each time. Nothing reads that header, so `disableSettingJwtHeader` turns it off. The OAuth provider for the CLI and MCP clients still signs its tokens with the plugin's keys. ## Validation - `pnpm check` - `hosted-installation.test.ts`, including a new test for `placementRegion` - `mcp-login-runtime.test.ts`, `auth.integration.test.ts`, `auth-cli.integration.test.ts` - Browser tests: 93 passed, 1 skipped. The CLI login suite did not run locally because the CLI binary was not built. Documentation: #287 (draft until a release includes this change). <!-- greptile_comment --> <!-- greptile_summary --> <h2><a href="https://app.greptile.com/api/retrigger?id=115718112&sig=ccca66ccf9a3742afb09c45e062d6d08efdf86760756b4187b5f9155588a2516"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img alt="Retrigger" src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2" align="right"></picture></a><a href="https://app.greptile.com/-/switch-tenant?tenant=mendra&next=%2Fwidefleet%2Fwidefleet%2Fpull%2F286&utm_source=greptile_review&utm_medium=github&utm_campaign=view_in_greptile"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptileDark.svg?v=2"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"><img alt="View in Greptile" src="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2" align="right"></picture></a>Confidence Score: 5/5 <sup><img alt="Tier: plus" title="Review tier: plus" src="https://greptile-static-assets.s3.amazonaws.com/badges/effort-plus.svg?v=3" height="12"></sup></h2> <!-- greptile-impact-verdict --> The PR appears safe to merge; no actionable issues were found. <details open><summary><h3>Summary</h3></summary> Adds optional `placementRegion` to hosted installations and disables the unused session JWT response header. - Hosted control planes can run in their database’s cloud region. - Session lookups stop adding an unused JWT header. </details> <!-- greptile_confidence_score:5 --> <sub>Reviews (1) · Last reviewed commit: ["Run the control plane next to its databa..."](0a9d3d4) · [Reviewed by Greptile](https://www.greptile.com/?utm_source=greptile_review&utm_medium=github&utm_campaign=review_public&utm_content=widefleet/widefleet)</sub> <!-- /greptile_comment -->
This branch has not been deployed
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.
Documents
placementRegionfrom #286 in the configuration reference, next to the other installation profile settings for Cloudflare installations.Blocked by: #286 and a release that includes it. Base:
worker-placement-and-session-jwt, so the diff shows only documentation.Checked:
oxfmt --checkon the changed page.