Skip to content

TrustPager driver: run every API call next to the database (Sydney) - #4

Merged
Esscay merged 1 commit into
mainfrom
region-pin-sydney
Sep 28, 2026
Merged

Esscay merged 1 commit into
mainfrom
region-pin-sydney

Conversation

@Esscay

@Esscay Esscay commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

What

Every call the TrustPager driver makes now carries x-region: ap-southeast-2, so the TrustPager API runs next to its database in Sydney.

Why

The API runs in the region nearest whoever calls it. From the Philippines that was Singapore, and every database read inside each call crossed the sea: the app's calls averaged about 3.3 seconds. The same call run in Sydney takes about 1.2 seconds (measured 2026-09-28 through api.trustpager.com: 4.2s forced to us-west-2, 1.2s in ap-southeast-2).

How

  • drivers/trustpager/__init__.py: HOME_REGION_HEADERS set once on TP_CFG through the kernel's existing vendor-neutral extra_headers, which the transport merges into every request. The kernel is untouched (tools/check-kernel-clean.py passes).
  • tests/test_trustpager_driver.py: a test pins the header so it cannot silently disappear.

Checks

  • BOS_OFFLINE=1 python -m unittest discover -s tests: 420 tests OK (39 skipped, as before)
  • check-no-secrets, check-kernel-clean, check-doctrine-voice, check-connectors, and the _scripts/sweep.py private-data sweep: all clean

Installed copies pick this up on bos update; no installer release is needed.

🤖 Generated with Claude Code

… ap-southeast-2)

The API otherwise runs in the region nearest the caller; from the Philippines that was Singapore, about 3.3s a call against about 1.2s in Sydney, because every database read crossed the sea (measured 2026-09-28). Set once on TP_CFG through the kernel's vendor-neutral extra_headers, so the kernel stays clean; a driver test pins it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Esscay
Esscay merged commit 78b6fa1 into main Sep 28, 2026
2 checks passed
@Esscay
Esscay deleted the region-pin-sydney branch September 28, 2026 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant