ByteStorage / FlyDB

The high-performance kv storage engine based on bitcask paper made in golang
Apache License 2.0
1.27k stars 101 forks source link

FlyDB optimization problem #187

Open sjcsjc123 opened 1 year ago

sjcsjc123 commented 1 year ago

In order to improve the throughput of FlyDB, we have the following options:

  1. WAL logging operation, using memory read/write key-value and asynchronous drop disk

  2. Introduce message queues, hand over disk drop operations to kafka or mq, and the main process only performs memory reads and writes

  3. Enable multiple processes in the background, pass in corresponding processes based on the key, execute data drop operations in the processes, and the main process only performs memory read and write operations

  4. If a certain monitoring mechanism is adopted and the asynchronous disk drop is unsuccessful, can a notification be sent to the client before the machine goes offline.

All of the above will have Big data loss status when the machine is offline instantly. If Kafka is deployed in other nodes, the loss will be smaller, but the operation is relatively more complex.

qishenonly commented 1 year ago

good issue!

qishenonly commented 1 year ago

In addition, we are talking about improving throughput here in the case of single machine optimization. We need to optimize single-threaded read and write so that it has better read and write performance.