Managing data store locality at scale with Akkio

In the past eight years, we’ve broken ground on 15 data centers around the world. During this time, the number of people using Facebook every month topped 2.2 billion. Those people are all sh…

Muthukaruppan Annamalai
10 min readintermediate
--
View Original

Overview

The article discusses Akkio, a data placement service developed by Facebook to optimize data store locality at scale. It highlights how Akkio reduces data duplication, improves retrieval speed, and minimizes network traffic while maintaining strong consistency across data centers.

What You'll Learn

1

How to optimize data placement using microshards

2

Why reducing data duplication is critical for scalability

3

When to implement a data placement service for geo-distributed systems

Prerequisites & Requirements

  • Understanding of data locality and distributed systems
  • Familiarity with ZippyDB and its functionalities(optional)

Key Questions Answered

How does Akkio optimize data placement across data centers?
Akkio optimizes data placement by splitting data sets into microshards, which are stored in regions close to where they are accessed. This approach reduces duplication and minimizes cross-region network usage, ensuring efficient data retrieval and fault tolerance.
What are the limitations of using distributed caching for Facebook's workloads?
Distributed caching can lead to excessive cross-data center communication due to low read-write ratios and the need for strong consistency. This results in high latencies unless the cache hit rate is extremely high, making it less effective for Facebook's critical workloads.
What is a microshard in the context of Akkio?
A microshard is the unit of data management in Akkio, containing related data that exhibits access locality. Akkio can support trillions of microshards, allowing for efficient data placement and retrieval based on user access patterns.
How does Akkio handle data migration for optimization?
Akkio's Data Placement Service (DPS) evaluates microshard access patterns and available capacity to determine optimal data placements. It initiates migrations when suboptimal placements are detected, ensuring efficient data distribution across data centers.

Key Statistics & Figures

Reduction in storage footprint
40 percent
This reduction is achieved through optimized data placement strategies implemented by Akkio.
Reduction in WAN traffic
50 percent
The implementation of Akkio has led to significant decreases in cross-region network usage.
Reduction in perceived latency
50 percent
Akkio's optimization strategies have resulted in a noticeable decrease in latency for end users.

Technologies & Tools

Database
Zippydb
Used as the global consistency key-value storage system to support Akkio's functionalities.

Key Actionable Insights

1
Implementing a microshard-based data placement strategy can significantly enhance data retrieval speeds.
This approach allows for localized data access, reducing latency and improving user experience, especially in geo-distributed systems.
2
Regularly analyze access patterns to inform data placement decisions.
By understanding how data is accessed over time, organizations can optimize their storage strategies, ensuring that data is placed where it is most frequently needed.
3
Consider the trade-offs between caching and direct data access in your architecture.
While caching can improve performance, it may introduce complexity and latency issues, particularly in systems requiring strong consistency.

Common Pitfalls

1
Relying solely on distributed caching can lead to performance issues due to high cross-data center communication.
This occurs because frequent writes can invalidate cached data, causing excessive communication overhead and latency.

Related Concepts

Data Locality
Distributed Systems
Caching Strategies
Microservices Architecture