Skip to main content

Compute and data locality

Generated from pattern-library/registry.json — do not edit by hand; change the registry and run bun run patterns:build.

Index card — the docs below are the canonical explanation; deep-tier pattern pages additionally carry invariants and emulation notes.

Category: Runtime Velocity · Tier: light · Maturity: proven (verified 2026-09-09 @ 921e8266-dirty) · Risk: medium — a locality change is a deployment change

A locality map derived from the environment rather than typed into a table: which region each system runs in, which of them are not observable at all, and the cross-region hops one request actually pays.

When to use: Use when the architecture contains remote databases, caches, object storage or AI providers — which is to say, almost always on serverless.

Docs

Code

  • src/lib/server/perf/locality.ts — Region extraction that keeps the credential it was derived from out of its output (GitHub · GitLab)
  • scripts/perf/locality.ts — bun run perf
    — the renderer (GitHub · GitLab)

Tests


Machine-readable record: velocity-compute-locality in pattern-library/registry.json.

← Back to Pattern Library

Think this pattern could be better? Tell us how.

Leave feedback