tikv / raft-engine

A persistent storage engine for Multi-Raft log
Apache License 2.0
564 stars 88 forks source link

Support double write to avoid io spike #342

Open Connor1996 opened 1 year ago

Connor1996 commented 1 year ago

In cloud environment, cloud disk IO may get stuck for a while due to cloud vendor infrastructure issues. This may affect the foreground latency dramatically. Raft log apply doesn't sync mostly, so it wouldn't be a problem. While raft log append is synced every time. To alleviate that, we can hedge raft log to two different cloud disks. If either one of them is synced, the raft log append is considered finished. Thus when one of the cloud disk IO is stuck, the other one can still work and doesn't affect foreground write flow.