Skip to content
A distributed key-value storage system developed and maintained by Xiaomi Cloud Storage Team.
C++ Shell C Python CMake Thrift Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Add issue & pull request templates (#331) Jun 6, 2019
docker docker: add scripts for packing docker image & local docker cluster d… ( Jun 21, 2019
docs CMakeList: remove DSN_IN_CORE & improve BOOST linking (#362) Jul 31, 2019
rdsn @ a429dfb
rocksdb @ dc91f8a
src refactor(config): remove duplicated config items for cluster name (#462) Jan 20, 2020
LICENSE Initial Commit Oct 13, 2017 fix: retry starting zookeeper if it failed on onebox environment (#453) Jan 3, 2020


Build Status License Releases

Note: The master branch may be in an unstable or even broken state during development. Please use releases instead of the master branch in order to get stable binaries.

Pegasus is a distributed key-value storage system which is designed to be:

  • horizontally scalable distributed using hash-based partitioning
  • strongly consistent: ensured by PacificA consensus protocol
  • high-performance: using RocksDB as underlying storage engine
  • simple: well-defined, easy-to-use APIs

Pegasus has been widely-used in XiaoMi and serves millions of requests per second. It is a mature, active project. We hope to build a diverse developer and user community and attract contributions from more people.


HBase was recognized as the only large-scale KV store solution in XiaoMi until Pegasus came out in 2015 to solve the problem of high latency of HBase because of its Java GC and RPC overhead of the underlying distributed filesystem.

Pegasus targets to fill the gap between Redis and HBase. As the former is in-memory, low latency, but does not provide a strong-consistency guarantee. And unlike the latter, Pegasus is entirely written in C++ and its write-path relies merely on the local filesystem.

Apart from the performance requirements, we also need a storage system to ensure multiple-level data safety and support fast data migration between data centers, automatic load balancing, and online partition split.

After investigating the existing storage systems in the open source world, we could hardly find a suitable solution to satisfy all the requirements. So the journey of Pegasus begins.

To start using Pegasus

See our documentation on Pegasus Website.

Related Projects


Client libs:

Test tools:

Data import/export tools:



Copyright 2015-now Xiaomi, Inc. Licensed under the Apache License, Version 2.0:

You can’t perform that action at this time.