Introducing Espresso - LinkedIn's hot new distributed document store

LinkedIn Engineering Team
17 min readadvanced
--
View Original

Overview

Espresso is LinkedIn's distributed, fault-tolerant NoSQL database that supports various applications, including Member Profile and InMail. It addresses the limitations of traditional RDBMS and key-value stores by providing a scalable, consistent, and efficient data management solution.

What You'll Learn

1

How to implement a distributed document store using Espresso

2

Why schema evolution is crucial for modern applications

3

How to ensure fault tolerance in distributed systems with Apache Helix

4

When to use Databus for change data capture in your applications

Prerequisites & Requirements

  • Understanding of distributed systems concepts
  • Familiarity with Apache Helix and Databus(optional)

Key Questions Answered

What are the key requirements for a distributed document store?
Espresso was designed with several key requirements in mind, including elasticity for horizontal scaling, consistency for read-after-write and eventual reads, fault tolerance to handle machine failures, and support for schema evolution without downtime. These features enable it to meet the needs of LinkedIn's applications effectively.
How does Espresso handle schema evolution?
Espresso supports schema evolution by allowing changes to document schemas according to Avro schema evolution rules. This means that backward incompatible changes are permitted, enabling developers to update schemas without significant downtime or coordination with DBA teams.
What role does Apache Helix play in Espresso's architecture?
Apache Helix manages the cluster state in Espresso, ensuring that partitions are evenly distributed across storage nodes and handling failover processes. It monitors the health of nodes and facilitates rapid recovery from failures, maintaining data availability and consistency.
What is the purpose of the Databus in Espresso?
Databus serves as the change capture mechanism in Espresso, transporting source transactions in commit order. It enables high throughput and low latency replication, facilitating event delivery to downstream consumers and supporting multi-datacenter replication.

Key Statistics & Figures

Production footprint
over a dozen clusters
Espresso supports approximately 30 LinkedIn applications, serving millions of records per second at peak.
Data volume
hundreds of terabytes
This figure does not include replicas, highlighting the significant data management capabilities of Espresso.

Technologies & Tools

Some links below are affiliate links. We may earn a commission if you make a purchase.

Cluster Management
Apache Helix
Used for managing the state of the Espresso cluster and facilitating failover processes.
Change Data Capture
Databus
Utilized for transporting source transactions and enabling replication across data centers.
Database
Mysql
Serves as the storage engine for Espresso, providing data storage and replication capabilities.
Data Serialization
Avro
Used for defining document schemas in Espresso.

Key Actionable Insights

1
Implementing Espresso can significantly enhance your application's scalability and fault tolerance.
By leveraging Espresso's distributed architecture, applications can handle increased loads and maintain availability during failures, making it ideal for high-demand environments.
2
Utilizing Databus for change data capture can streamline data replication processes.
This allows for efficient event delivery to various systems, ensuring that downstream applications have access to the most current data without significant delays.
3
Understanding schema evolution is vital for maintaining application agility.
With Espresso, teams can evolve their data models without downtime, enabling faster iterations and reducing the friction typically associated with database changes.

Common Pitfalls

1
Failing to account for schema evolution can lead to application downtime.
Without a proper strategy for evolving schemas, teams may face significant challenges when attempting to update their data models, resulting in service interruptions.
2
Neglecting fault tolerance in distributed systems can result in data loss.
If systems are not designed to handle node failures gracefully, applications may experience outages or data inconsistencies, undermining user trust.

Related Concepts

Distributed Systems Architecture
Nosql Database Design
Data Replication Strategies