All Topics
All Topics
Technology
Technology
AI
AI
Business
Business
Entertainment
Entertainment
News
News
Programming
Programming
Security
Security
Science
Science
Design
Design
Environment
Environment
Finance
Finance
Crypto
Crypto
Politics
Politics
Sports
Sports
Education
Education
Gaming
Gaming
Art
Art
Music
Music
Health
Health
Books
Books
Food
Food
Travel
Travel
Personal
Personal
Bluesky
Twitter

Durable Objects, Workers - Access Durable Object jurisdiction via `ctx.id.jurisdiction`

3mo ago

Source

CloudflareDurable Objects, Workers - Access Durable Object jurisdiction via `ctx.id.jurisdiction`cloudflare.com
Snippet from the RSS feed
ctx.id.jurisdiction inside a Durable Object now reports the jurisdiction the object was created in — for example "eu" when accessed through env.MY_DURABLE_OBJECT.jurisdiction("eu") — so you can make region-aware decisions without passing the jurisdiction through method arguments or persisting it in storage. For the full list of ID-construction paths that preserve jurisdiction , refer to the Durable Object ID documentation . export class RegionalRoom extends DurableObject { async fetch ( request ) { // "eu" when accessed through env.MY_DURABLE_OBJECT.jurisdiction("eu") const region = this . ctx . id . jurisdiction ; return new Response ( `Hello from ${ region ?? "the default region" } !` ) ; } } // Worker export default { async fetch ( request , env ) { const stub = env . MY_DURABLE_OBJECT . jurisdiction ( "eu" ) . getByName ( "general" ) ; return stub . fetch ( request ) ; }, }; ctx.id.jurisdiction is undefined for Durable Objects that were not created in a jurisdiction-restricted namespace. Alarms scheduled before 2026-03-15 also do not have jurisdiction stored; to backfill the value, reschedule the alarm from a fetch() or RPC handler.

You might also wanna read

Mergeable Containers: Solving Concurrent Child Creation Conflicts in CRDTs

This article discusses a fundamental problem in JSON-like CRDTs (Conflict-free Replicated Data Types) where concurrent creation of child con

loro.dev·25d ago

No jurisdiction has granted users actual data ownership despite GDPR and CCPA privacy laws

Despite the implementation of major privacy regulations like the GDPR in Europe and the CCPA in California, no jurisdiction has granted user

dlvr.it·1mo ago

Postgres-Backed Durable Workflow Execution: An Alternative to External Orchestration Systems

This article explains the concept of durable workflow execution using Postgres as the backing database, as implemented by the DBOS system. I

dbos.dev·1mo ago

Postgres-Backed Durable Workflow Execution: An Alternative to External Orchestration Systems

This article explains the concept of durable workflow execution using Postgres as the backing database, as implemented by the DBOS system. I

dbos.dev·1mo ago

Implementing a Durable Execution Engine Using SQLite for Persistent Workflows

The article explores building a Durable Execution (DE) engine using SQLite, explaining how DE engines make multi-step workflows persistent a

morling.dev·7mo ago

The durable asset is the loop you own. OpenEnv is its protocol.

Microsoft·15d ago

Examining Destructive Move Semantics in C++26: Can Programmers Express Object-Consuming Functions?

The article discusses whether C++26 will include destructive move semantics, which would allow functions to consume objects without running

stackoverflow.com·7mo ago

Comments

Sign in to join the conversation.

No comments yet. Be the first.