---
title: "How we built multi-region support for Linear"
description: "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."
url: "https://swe.quest/articles/how-we-built-multi-region-support-for-linear-acbf98e7bc2a3edb"
canonical: "https://linear.app/now/how-we-built-multi-region-support-for-linear"
source: "Linear"
published: "2024-05-23"
difficulty: "medium"
kind: "Case study"
reading_minutes: 9
tags: ["system-design","distributed-systems","identity-auth","infrastructure-as-code","postgres"]
---

# How we built multi-region support for Linear

A post on [Linear](https://swe.quest/sources/linear.md), published 2024-05-23, 9 min read, Case study. Original: [https://linear.app/now/how-we-built-multi-region-support-for-linear](https://linear.app/now/how-we-built-multi-region-support-for-linear)

## Summary

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.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [System design](https://swe.quest/tags/system-design.md) (Architecture & design)
- [Distributed systems](https://swe.quest/tags/distributed-systems.md) (Distributed systems)
- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)
- [Infrastructure as code](https://swe.quest/tags/infrastructure-as-code.md) (Infrastructure)
- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)

## Prerequisites

- Postgres basics ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))
- Infrastructure as code ([easy posts on Infrastructure as code](https://swe.quest/tags/infrastructure-as-code.md?difficulty=easy))
- Reverse proxies ([easy posts on Load balancing](https://swe.quest/tags/load-balancing.md?difficulty=easy))
- JWT authentication ([easy posts on Identity & auth](https://swe.quest/tags/identity-auth.md?difficulty=easy))

## Keywords

Linear, Cloudflare Workers, Terraform, Google Cloud, Google Pub/Sub, GraphQL, Zeus, GDPR

## Related posts

- [Hello, World: We’re Railway](https://swe.quest/articles/hello-world-we-re-railway-63540b1cb9b8fafa.md): Railway · 2023-09-25 · Medium · 17 min read · Networking, CDN & edge, Load balancing, Infrastructure as code, Storage systems
  Railway launches US-East, EU-West and Southeast Asia regions alongside its original US-West GCP zone, with one-click region moves that need no URL or DNS changes.
- [The Best Multi-Region Hosting Platforms in 2026](https://swe.quest/articles/the-best-multi-region-hosting-platforms-in-2026-fbed8cd7b315a007.md): Railway · 2026-05-25 · Easy · 13 min read · Cloud platforms, Distributed databases, Replication, System design
  "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).
- [Sharding Infrastructure: The Regional Goval Project](https://swe.quest/articles/sharding-infrastructure-the-regional-goval-project-86db1e97083bbccb.md): Replit · 2024-02-14 · Medium · 7 min read · Infrastructure as code, Distributed systems, Cloud platforms, Resilience, Deployment
  Replit re-sharded the infrastructure that runs Repls (Goval) from a few unbalanced, multi-region clusters partitioned by user membership into uniformly sized, single-region clusters with Repls distributed by consistent hashing, shrinking failure domains and removing cross-region traffic.
- [Railway vs Cloudflare: How Their Architectures Differ and When to Use Each](https://swe.quest/articles/railway-vs-cloudflare-how-their-architectures-differ-and-when-to-use-each-da6a8e4c1e4636fe.md): Railway · 2025-11-28 · Medium · 15 min read · Serverless, CDN & edge, Cloud platforms, System design, Containers
  Railway and Cloudflare's Developer Platform feel similar on the surface but rest on opposite compute models.
- [The Future of Databases is Services](https://swe.quest/articles/the-future-of-databases-is-services-095ed42dc75f94bb.md): Railway · 2023-09-26 · Easy · 9 min read · Databases, Cloud platforms, Deployment, System design
  Railway replaced its bespoke per-database Plugins (Postgres, Redis, Mongo, MySQL) with databases deployed as ordinary services, built from general-purpose primitives: ZFS-backed NVMe volumes, Docker image deploys, port-based TCP proxies per region, private networking, cross-service variable references, and a \`${{ secret() }}\` template function for generated passwords.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
