Databases 12 min read

Pegasus: Architecture, New Features, Ecosystem, and Community Overview

This article introduces Pegasus, a distributed key‑value store, covering its background, system architecture, double‑WAL design, performance benchmarks, recent features such as hot backup, bulk load, access control, partition split, as well as its ecosystem tools and community development plans.

DataFunTalk
DataFunTalk
DataFunTalk
Pegasus: Architecture, New Features, Ecosystem, and Community Overview

Today we share the design, implementation, and open‑source journey of Pegasus, a distributed key‑value storage system.

Background : Existing storage systems like Redis and HBase have limitations in consistency, cost, and latency; Pegasus was created to address these challenges.

System Architecture : Pegasus consists of a Meta server for metadata and configuration, Replica servers that store user data using RocksDB and ensure strong consistency via the PacificA protocol, and Zookeeper for leader election and cluster metadata. Clients first query the Meta server for routing information and then interact directly with Replica servers.

The data model uses a two‑level index with hashkey (primary) and sortkey (secondary), enabling atomic batch operations on data sharing the same hashkey.

Double‑WAL Design : To reduce write latency, Pegasus separates write‑ahead logs (WAL) onto a dedicated disk and employs a shared log for synchronous writes while private logs handle load balancing and fault recovery, mitigating long‑tail latency.

Performance Test : Benchmark results for version 2.2.0 under YCSB are presented, demonstrating the system’s throughput and latency characteristics.

New Features :

Hot backup for online cross‑region replication, supporting single‑master and multi‑master modes, and enabling seamless data migration and disaster recovery.

Bulk Load for fast ingestion of large datasets via Pegasus‑Spark generated SST files.

Access Control using Kerberos authentication and table‑level whitelist to restrict client access.

Partition Split allowing hash‑based partition doubling to alleviate hotspot partitions.

Ecosystem :

Pegasus‑Spark provides a connector for Spark to perform offline analysis and bulk loading using RocksJava + JNI.

Meta Proxy acts as a unified entry point, abstracting Meta server addresses and simplifying client configuration.

Disk Data Migration Tool balances disk usage by moving shards between disks with minimal impact on users.

Community Building : Pegasus originated in 2015, open‑sourced in 2017, and joined the Apache Incubator in 2020. The community encourages contributions through client, shell, and tool development, and highlights recent commits (e.g., Partition Split, custom compaction, load balancing) in version 2.3.0.

Future plans include further performance optimizations, hot‑backup enhancements, tracing, admin service unification, and support for dual‑replica architectures.

Readers are invited to join the open‑source project on GitHub, follow the official WeChat accounts, and participate in workshops and meetups.

Big DataDistributed DatabaseBulk LoadKey-Value StorePegasusHot BackupPartition Split
DataFunTalk
Written by

DataFunTalk

Dedicated to sharing and discussing big data and AI technology applications, aiming to empower a million data scientists. Regularly hosts live tech talks and curates articles on big data, recommendation/search algorithms, advertising algorithms, NLP, intelligent risk control, autonomous driving, and machine learning/deep learning.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.