apache / horaedb

Apache HoraeDB (incubating) is a high-performance, distributed, cloud native time-series database.
https://horaedb.apache.org
Apache License 2.0
2.62k stars 203 forks source link

Tracking issue for compaction offloading #1545

Open LeslieKid opened 3 months ago

LeslieKid commented 3 months ago

Describe This Problem

We found in production that the speed of sst compaction is unable to keep up with the speed of sst generation, leading to poor query performance. However we are unable give more resource to compaction to solve the problem because query/write is more important than compaction in the same node.

It is really hard to do a trade-off about resource allocation among query, write and compaction in lsm model. We want to compact the generated small ssts as fast as possible, but we can't tolerate its influence to query/write. And finally I think offload the compaction to the seperated nodes may be the key for it.

Proposal

The following is the architecture for compaction offloading.

Architecture.png

To support compaction offloading, we need:

Additional Context

This issue replaces issue #1480. Please close issue #1480 as it is outdated.

incubator-horaedb-proto#133 is highly related to this issue.

Rachelint commented 3 months ago

looks great!

Rachelint commented 2 months ago

I think in the first stage, we can treat the compaction cluster as same as the horaedb cluster. And we just reuse the ability about monitoring and scheduling for horaedb cluster in horaemeta.

And we can start to desigin the specific schedule strategy for compaction cluster after it can work.

LeslieKid commented 2 months ago

I think in the first stage, we can treat the compaction cluster as same as the horaedb cluster. And we just reuse the ability about monitoring and scheduling for horaedb cluster in horaemeta.

And we can start to desigin the specific schedule strategy for compaction cluster after it can work.

Thanks for your suggestion! I think it's a good idea to first implement a simple working version.

Rachelint commented 1 month ago

I think Horaedb node supports submitting the compaction task to remote may be similar as Compaction node supporting remote compaction service.

I guess the third step can be integration test, test is very important actually.

Rachelint commented 1 month ago

Maybe you will be insterested when writing test https://github.com/apache/horaedb/tree/main/integration_tests/dist_query