# prafties **Repository Path**: gaopedro/prafties ## Basic Information - **Project Name**: prafties - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-05-30 - **Last Updated**: 2021-05-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # prafties > 学习 raft 使用,实现一个玩具分布式 K-V ## 使用 ```sh go build ``` 启动主节点: ```sj ./prafties.exe --http=127.0.0.1:6000 --raft=127.0.0.1:7000 --node=./node1 --bootstrap=true ``` 启动从节点: 注意:由于是发送 HTTP 请求来 JOIN,因此 --join 参数传入的是 leader 节点的 HTTP 监听端口。 ```sh ./prafties.exe --http=127.0.0.1:6001 --raft=127.0.0.1:7001 --node=./node2 --join=127.0.0.1:6000 ```