Case study · Stack

How Linear built a fast issue tracker

Linear is an issue tracker and project planning tool for software teams, known for feeling instant. Under the hood it runs TypeScript end to end, with its own sync engine keeping data on the client and a single Postgres database on Google Cloud.
Copy this stacklinear.app Project management for software teams · United States · founded 2019

Language

  • TypeScriptlinear.app

    The single language across the stack, from database models to GraphQL resolvers and UI components.

UI library

Hosting

  • Google Cloudlinear.app

    Main cloud provider, starting in us-east1.

  • Kuberneteslinear.app

    Orchestrates the services running on Google Cloud.

  • Terraformlinear.app

    Describes the infrastructure as code, with the region passed in as a variable.

    Why: Moving to infrastructure as code made spinning up a second region a lot easier.

  • Cloudflare Workerslinear.app

    Proxy that authenticates each request and routes it to the user's region.

    Why: Linear already used Cloudflare Workers extensively, so it was an easy decision.

Database

  • PostgreSQLlinear.app

    Main database, kept as a single instance per region.

Styling and UI kit

  • styled-componentslinear.app

    Styles the React components.

Data fetching

  • MobXlinear.app

    Manages reactive state on the front end on top of the synced data.

  • Linear sync engine (WebSockets)linear.app

    In-house sync framework over WebSockets that keeps data on the client and syncs changes in real time.

    Why: Built for speed and offline support, which Linear treats as core product values.

  • GraphQLlinear.app

    Powers the public API and SDK, and also the internal API between services.

    Why: For service-to-service calls they picked it because the codebase already had strong GraphQL tooling.

  • Redislinear.app

    Cache in the back end, including the cursors of the sync engine.

  • Google Cloud Pub/Sublinear.app

    Fans background tasks out to every region.

    Why: It kept the authentication service simple, answering only HTTP requests.

Backend framework

  • Node.jslinear.app

    Runs the back-end services.

  • Temporallinear.app

    Runs durable workflows, including the agentic workload system at production scale.

How they built it

Speed came first, so they built their own sync engine

From day one, Linear set speed as a core product value: data stored locally, no page reloads, and the app working offline, plus real-time sync and teammate presence for multiplayer.

To get there, the team built a proprietary sync framework over WebSockets designed for speed and offline support. CTO Tuomas Artman has given talks on how the engine works and how it had to change as Linear grew.

Sources:linear.app linear.app linear.app

One language across the whole stack

Linear's engineers work in TypeScript everywhere, from database models to GraphQL resolvers and UI components. The front end is React with MobX and styled-components; the back end is Node with Postgres, Redis and Temporal.

The same GraphQL layer powers the public API and SDK, so customers integrate with the API the team uses itself.

Sources:linear.app

Going multi-region without sharding the database

In 2024 Linear added a European region. Its infrastructure had been managed by hand in Google Cloud's us-east1, so the first step was moving it to Terraform, which made spinning up a second region much easier.

Instead of sharding Postgres, they replicated the entire deployment per region, so developers still write code against a single database instance. A small authentication service, a Cloudflare Worker that routes each request to the right region, and Google Cloud Pub/Sub for background tasks across regions tie it together.

Sources:linear.app

What a bad migration taught them

In January 2024 a database migration deleted data and Linear restored the database from a backup taken hours earlier. The post-mortem describes a database cache in front of Postgres and sync cursors cached in Redis, both of which made recovery harder.

The team responded with CI warnings for dangerous migrations, tighter access to production databases and dry runs in staging.

Sources:linear.app

Also detected on their website

Found on the homepage with the open Wappalyzer rules (HTML, scripts and headers). It shows what runs in the browser, not the whole backend.

  • Algolia
  • Cloudflare
  • Google Cloud CDN
  • HSTS
  • HTTP/3
  • Linkedin Insight Tag
  • Sanity
  • Sanity.io