TL;DR

Linear’s speed stems from its innovative local-first database approach, using IndexedDB in the browser, and a custom sync engine that eliminates network delays. This results in near-instant updates, setting it apart from traditional web apps.

Linear can update issues in less than a millisecond, a feat achieved through its unique architecture that leverages a local database in the browser and a custom sync engine, setting a new standard for web app responsiveness.

According to insights from developer Dennis Brotzky and observations from Linear’s public communications, the core of Linear’s speed lies in its use of IndexedDB as the primary data store within the browser. This approach allows for immediate local updates, which are reflected instantly in the UI without waiting for network responses. When a user modifies an issue, the change is applied directly to an in-memory observable (using MobX), and the sync engine batches these changes for asynchronous transmission to the server. This design eliminates typical network latency from the user experience, making updates feel instantaneous.

Linear’s sync engine is a bespoke system that queues mutations locally and applies them immediately to the UI, then asynchronously pushes these changes to the backend. This method contrasts with traditional CRUD apps, where each update involves a network request that can take hundreds of milliseconds, causing UI delays and spinners. By decoupling the UI response from network latency, Linear provides a seamless, native-like experience.

The stack supporting this architecture is intentionally simple, comprising React, TypeScript, MobX, PostgreSQL, and a CDN, with no reliance on complex edge databases or server-side rendering. The app also employs optimistic updates, where local changes are immediately reflected and only rolled back if the server reports an error, further enhancing perceived speed.

Why It Matters

This approach significantly improves user experience by making interactions feel instantaneous, which can increase productivity and user satisfaction. It also demonstrates a shift toward local-first web app architectures that prioritize responsiveness over traditional server-centric models. For developers, understanding Linear’s architecture offers a blueprint for building highly responsive applications, especially in collaborative or issue-tracking contexts where real-time updates are critical.

Amazon

IndexedDB browser storage device

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Background

Linear launched with a focus on performance, and its architecture has been shaped by a deliberate choice to prioritize local data handling. The concept of a local database in the browser is not new but is rarely implemented at this scale for real-time collaborative apps. Prior to this, most web apps relied heavily on server round-trips, which introduced latency and UI delays. Linear’s approach reflects a broader trend toward edge computing and local-first data models, but with specific optimizations for speed and simplicity. Their decision to build a custom sync engine from day one distinguishes them from competitors that rely on third-party libraries, aiming for maximum control over performance.

“The secret to Linear’s speed is the database in the browser, using IndexedDB, and a custom sync engine that batches and asynchronously updates the server.”

— Dennis Brotzky

“Literally the first lines of code I wrote were the sync engine, which is very uncommon for startups.”

— Tuomas, Linear co-founder

Amazon

local-first database for web apps

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

What Remains Unclear

It is still unclear how Linear manages data consistency and conflict resolution across multiple clients in real-time, or how scalable this approach is under heavy load. Specific implementation details of their sync engine remain proprietary and are not publicly documented.

Amazon

custom sync engine software

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

What’s Next

Further technical disclosures from Linear may reveal more about their sync engine and data consistency strategies. Observers expect updates on how the architecture performs at scale and how it might be adapted for other applications seeking similar responsiveness.

Amazon

React TypeScript development tools

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Key Questions

How does Linear’s local database improve performance?

By storing data in IndexedDB within the browser, Linear allows immediate local updates that are reflected in the UI without waiting for network responses, drastically reducing latency.

What is the role of the custom sync engine?

The sync engine batches local mutations and asynchronously pushes them to the server, enabling near-instantaneous UI updates and background synchronization.

Can other apps replicate Linear’s speed?

While libraries like Tanstack Query and SWR can approximate similar responsiveness with optimistic updates, Linear’s custom architecture is tailored for maximum speed and may be challenging to replicate exactly without similar design decisions.

Does this architecture affect data consistency?

The approach relies on background synchronization and conflict resolution strategies, but specific details about how data consistency is maintained across multiple clients are not publicly disclosed.

Is this approach scalable for large teams or complex data?

Scalability at high concurrency levels remains to be tested; current information suggests the architecture is optimized for responsiveness rather than massive-scale data distribution, but further insights are expected as Linear grows.

Source: Hacker News

You May Also Like

Resource‑Efficient AI: Innovations in Hardware and Cooling

Next-generation hardware and cooling innovations are revolutionizing resource-efficient AI—discover how these breakthroughs can transform your sustainable AI initiatives.

AI in Legal Services: Contracts and Compliance

Legal professionals leveraging AI in contracts and compliance can revolutionize workflows—discover how this technology can transform your practice today.

The Future of Quantum Computers and Security

Future quantum computers will revolutionize security, demanding innovative solutions to stay ahead; discover how you can prepare for this transformative shift.

Natural Language Processing Explained

Imagine how machines understand human language—discover the fascinating world of Natural Language Processing and its impact on everyday technology.