BRAFT

基于 brpc 的 RAFT 共识算法的工业级 C++ 实现,在百度内部广泛用于构建高可用的分布式系统。「An industrial-grade C++ implementation of RAFT consensus algorithm based on brpc, widely used inside Baidu to build highly-available distributed systems.」

Github stars Tracking Chart

概述

braft 是基于 brpc 的 RAFT 共识算法和复制状态机的工业级 C++ 实现。braft 的设计和实现是针对要求高工作负载和低延迟开销的场景,考虑到概念的简单易懂,使百度内部的工程师可以单独和正确地建立自己的分布式系统。

它在百度内部被广泛用于构建高可用的系统,例如:

  • 存储系统。键值、块、对象、文件......。
  • SQL 存储系统。HA MySQL 集群,分布式交易,NewSQL 系统...
  • 元服务。各种主模块、锁服务 ...

入门

  • 构建 brpc 是 braft 的主要依赖
  • Compile braft with cmake
    $ mkdir bld && cd bld && cmake .. && make        
  • 通过 examples 学习 braft。

文档

讨论

  • 添加微信 ID zhengpf__87 或 xiongk_2049,并附上验证信息 'braft',然后你将被邀请进入讨论组。

Overview

Name With Ownerbaidu/braft
Primary LanguageC++
Program languageCMake (Language Count: 5)
PlatformLinux
License:Apache License 2.0
Release Count6
Last Release Namev1.1.2 (Posted on )
First Release Namev1.0.0 (Posted on )
Created At2018-02-07 11:25:57
Pushed At2024-04-10 06:53:12
Last Commit At2024-02-21 16:36:31
Stargazers Count3.8k
Watchers Count185
Fork Count851
Commits Count698
Has Issues Enabled
Issues Count298
Issue Open Count126
Pull Requests Count92
Pull Requests Open Count36
Pull Requests Close Count22
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

Build Status


An industrial-grade C++ implementation of RAFT consensus algorithm and replicated state machine based on brpc. braft is designed and implemented for scenarios demanding for high workload and low overhead of latency, with the consideration for easy-to-understand concepts so that engineers inside Baidu can build their own distributed systems individually and correctly.

It's widely used inside Baidu to build highly-available systems, such as:

  • Storage systems: Key-Value, Block, Object, File ...
  • SQL storages: HA MySQL cluster, distributed transactions, NewSQL systems ...
  • Meta services: Various master modules, Lock services ...

Getting Started

  • Build brpc which is the main dependency of braft.

  • Compile braft with cmake

    $ mkdir bld && cd bld && cmake .. && make
    
  • Play braft with examples.

Docs

To the top