How to build a multi-region Python app with CockroachDB, Django, and K8s
Data domiciling in a Django app on CockroachDB works by adding a 'cloud' field to a Customers model, deploying the app to Kubernetes clusters in Azure, AWS and GCP, and pinning each row to a region. The setup uses a computed crdb_internal_region column with a CASE expression and REGIONAL BY ROW table locality. ALTER DATABASE ... PLACEMENT RESTRICTED then keeps non-voting replicas in the right locality, and replication constraint reports verify that violating ranges have moved. Pinning data cuts consensus round trips for lower write latency and helps meet data sovereignty requirements.
Related posts
- Orbital Computing and Distributed Databases | CockroachDB
Cockroach Labs mediumAdeptOrbital compute creates a harder problem for stateful systems than for GPUs: data must be replicated, coordinated and placed across a moving constellation. CockroachDB's existing mechanisms—Raft quorum commits, locality-aware replica placement, leaseholders and hybrid logical clocks—map onto orbital localities, but locality becomes temporal because the best node for reads or quorum changes as satellites move. Latency ranges from a few milliseconds within a plane to 30–80 ms across the constellation, while relativistic clock drift at 550 km is about 23 microseconds per day, negligible against the default 500 ms clock-skew tolerance. The practical tradeoff is hybrid storage: keep hot, latency-sensitive data near orbital compute and sink cold durable data to ground stations, accepting a 3.67 ms round trip when necessary.
- How we built multi-region support for Linear
Linear mediumAdept
Linear added an EU region by replicating its entire production deployment per region rather than sharding the database, keeping each region isolated and letting engineers keep writing against a single Postgres instance. The work came in three phases: Terraforming the previously hand-managed GCP infrastructure into region-parameterized modules, extracting a global authentication service that owns users, workspaces and their region mapping, and putting a Cloudflare Workers proxy in front of all traffic to route requests to the right region with a signed JWT. Shared records are created and deleted in the auth service first so uniqueness holds globally, updates propagate asynchronously through the sync engine, cross-service calls flow one way (auth to regions via Pub/Sub), and background jobs reconcile the two sides. Fallbacks and feature flags kept cut-overs late and mostly invisible to users.
- The Best Multi-Region Hosting Platforms in 2026
Railway easyNovice"Multi-region" covers three distinct problems: CDN static asset distribution (level 1), stateless compute in multiple regions with a single-region database (level 2), and multi-region writes for stateful data (level 3). Most teams need level 2 but believe they need level 3, which costs roughly an order of magnitude more in money and engineering complexity and requires application changes like idempotency keys and conflict semantics. Ten platforms are ranked against this framework, from Railway, Fly.io and Cloudflare for level 2 to AWS DynamoDB Global Tables/Aurora Global, Google Spanner, Azure Cosmos DB and CockroachDB for level 3, each with pricing and trade-offs.
- Announcing Deno KV
Deno mediumAdeptDeno KV is a strongly consistent key-value database built into the Deno runtime. It is backed by SQLite when run locally and by FoundationDB when managed on Deno Deploy, where it is globally replicated across 35 regions. The API stores structured-serializable JavaScript values under array keys, supports prefix listing with cursor pagination, and offers atomic multi-key transactions using check-and-set. Reads are strongly consistent (serializable and linearizable) by default and can opt into eventual consistency for lower latency, for example 7ms versus 94ms in Frankfurt during the beta.
- Lessons Learned From Running Apache Airflow at Scale
Shopify Engineering mediumAdeptShopify runs Airflow 2.2 on Kubernetes with the Celery executor and MySQL 8, and its largest environment handles over 10,000 DAGs and 150,000 runs per day. Running at that scale meant replacing GCSFuse with an in-cluster NFS server synced from GCS, enforcing a 28-day metadata retention policy, and tracking ownership through a per-environment namespace manifest. That manifest feeds a cluster DAG policy that restricts queues, pools and Kubernetes namespaces. To smooth load spikes, Shopify uses deterministically randomized crontab schedules hashed from dag_id and manages contention with pools synced from a ConfigMap, priority weights and isolated Celery queues.