Snippets that know where you are
A concept for turbopuffer’s docs by Uzo Okafor. Not affiliated with turbopuffer. Everything below was checked against turbopuffer’s own docs, SDKs and public endpoints on 2026-12-04, and none of it needs an account or an API key.
The one-line fix
/docs/regions says, in an amber box: “gcp-us-central1 is compute-constrained. Please choose another region for new workloads”. The quickstart says “The snippets default to gcp-us-central1”, and 497 snippet lines across 22 docs pages use it.
Change that default to gcp-us-east4, which the regions page’s own example already uses, and the docs stop contradicting themselves. This concept starts from exactly that: before anything is measured, every snippet says gcp-us-east4. If you only take one thing, take that.
What one line doesn’t fix
- The right region depends on the page’s code. The quickstart calls
nvidia/nemotron-3-embed-8bandzeroentropy/zerank-2, which each run in 14 of 21 regions (none in Singapore, Sydney, Mumbai, São Paulo, Seoul or Azure). “Pick your nearest region” breaks the quickstart for a lot of the world. So the default is the nearest region that runs every model the page calls: 13 candidates on the quickstart, 19 on /docs/write, which calls none. A region that can’t run the page is greyed out in the menu with the missing model named in the row. - The docs forget your language. Pick Go, go to /docs/query, and it’s Python again, with nothing stored. Region and language now live in one place (
localStorage["tpuf-docs-setup"]), applied by a tiny head script before the first paint, so a reload never flashes Python or the default region. - The trade-off is explained where you copy. When the region moves by itself, one quiet line under the first code block says where to and why (“aws-ap-southeast-1 is closer but can’t run zerank-2”). A region you picked is never moved; if a page can’t run in it, an amber note in their callout style offers the nearest one that can, in one click.
- Measured from your browser, the way /docs/regions already does it. One GET to
https://per region warms the connection and is thrown away, then the median of three. At most six in flight, once per session after the page is idle, cached with a timestamp, and again only when you ask. Central1 and Azure (beta) are never picked for you.{region}.turbopuffer.com/
A fresh request, Abuja to Iowa vs London
What a new user pays on every cold connection to the default region. curl timings, fresh connection, median of 5, one character ≈ 20 ms.
gcp-us-central1 Iowa first byte after 765 ms dns ▓ 3 ms tcp ▓▓▓▓▓▓▓▓▓▓▓▓▓ 256 ms 1 round trip tls ░░░░░░░░░░░░░▓▓▓▓▓▓▓▓▓▓▓▓ 244 ms 1 round trip (TLS 1.3) req ░░░░░░░░░░░░░░░░░░░░░░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓ 262 ms 1 round trip napkin: 3 round trips × ~254 ms ≈ 762 ms aws-eu-west-2 London first byte after 467 ms dns ▓ 3 ms tcp ▓▓▓▓▓▓▓ 144 ms 1 round trip tls ░░░░░░░▓▓▓▓▓▓▓▓ 152 ms 1 round trip (TLS 1.3) req ░░░░░░░░░░░░░░░▓▓▓▓▓▓▓▓ 168 ms 1 round trip napkin: 3 round trips × ~155 ms ≈ 465 ms ≈298 ms more on every cold connection, before turbopuffer does any work.
Same browser, same minute: their Browser RTT vs this concept
Each round loads turbopuffer.com/docs/regions, waits 15 s for its Browser RTT column to settle, then measures this concept in the same browser. Median of the rounds. From Uzo's home connection in Abuja. 3 rounds per engine, 2026-12-04. Every region lands within 15% of turbopuffer’s own number in Chrome and 16% in WebKit.
| region | theirs, Chrome | ours, Chrome | theirs, WebKit | ours, WebKit |
|---|---|---|---|---|
| aws-ap-southeast-2 | 437 ms | 432 ms | 439 ms | 430 ms |
| aws-ca-central-1 | 268 ms | 270 ms | 246 ms | 286 ms |
| aws-eu-central-1 | 171 ms | 173 ms | 164 ms | 184 ms |
| aws-eu-west-1 | 191 ms | 163 ms | 207 ms | 174 ms |
| aws-eu-west-2 | 152 ms | 151 ms | 182 ms | 169 ms |
| aws-us-east-1 | 233 ms | 244 ms | 269 ms | 280 ms |
| aws-us-east-2 | 278 ms | 281 ms | 279 ms | 301 ms |
| aws-us-west-2 | 308 ms | 343 ms | 298 ms | 311 ms |
| aws-ap-south-1 | 350 ms | 300 ms | 291 ms | 309 ms |
| aws-sa-east-1 | 385 ms | 362 ms | 342 ms | 380 ms |
| aws-ap-southeast-1 | 324 ms | 339 ms | 332 ms | 369 ms |
| gcp-us-central1 | 253 ms | 240 ms | 249 ms | 258 ms |
| gcp-us-east1 | 254 ms | 251 ms | 223 ms | 256 ms |
| gcp-us-west1 | 329 ms | 302 ms | 289 ms | 300 ms |
| gcp-us-east4 | 217 ms | 227 ms | 212 ms | 231 ms |
| gcp-northamerica-northeast2 | 250 ms | 239 ms | 227 ms | 242 ms |
| gcp-europe-west3 | 180 ms | 199 ms | 164 ms | 187 ms |
| gcp-europe-west1 | 191 ms | 183 ms | 159 ms | 169 ms |
| gcp-asia-southeast1 | 345 ms | 355 ms | 320 ms | 323 ms |
| gcp-asia-northeast3 | 391 ms | 410 ms | 377 ms | 391 ms |
| azure-eastus2 | 255 ms | 249 ms | 236 ms | 246 ms |
Evidence
- The constrained warning is missing from the Wayback copy of /docs/regions on 2026-09-27 and present on 2026-11-04.
- status.turbopuffer.com shows gcp-us-central1 as the only region under 100% uptime this quarter (99.89%), with 5xx incidents on 2026-09-02 and 2026-10-08.
- The quickstart still defaulted to central1 on 2026-11-25 (archived) and on 2026-12-04.
- Snippet lines using
gcp-us-central1: query 128, write 77, quickstart 73, embedding 44, fts 35, and others; 497 across 22 pages. - The pieces already exist on turbopuffer.com: /docs/regions times all 21 regions from the browser with number-flow digits, and every code block already has a Radix Select for the embedding provider. This connects them; it doesn’t add a new surface.
How it’s checked
npm run check:snippetsputs a region into every snippet, compiles all the Python ones in a venv withturbopuffer==2.12.0, type-checks the TypeScript ones against@turbopuffer/turbopuffer, builds both clients with networking switched off, and fails if any eligible region can’t run a model its page calls.- Unit tests cover the rules: central1 and Azure are never picked for you, a region you picked is never overridden.
- Checked in Chrome and WebKit at 1440 and 375, next to turbopuffer.com at the same sizes.
- “Show me how” has one Playwright spec per step, in both engines. The flip, the menu and the font hold were sampled frame by frame.
What wasn’t built
- Only Quickstart, Write and Query are ported, and only their first sections. Every other link goes to the real page.
- On the quickstart’s first code block the region gets a row of its own under the header: next to their tabs and “Native Embeddings” there are 48px left, and their header stays exactly as it is. Every other block carries the region and its round trip in the header.
- A
?region=on the.mdandllms-full.txtexports would give agents the same fix. It isn’t built; shared links to these pages (?region=,?lang=) are. - Search, the cookie banner, sign-up and the dashboard are out of scope.