Description
When write throughput exceeds compaction throughput, L0 files pile up, causing read amplification to spike. ApexStore needs write backpressure.
Implementation
- Track L0 file count per CF
- Configurable thresholds:
- SOFT_LIMIT (L0 > 10): hint to slow down writes
- HARD_LIMIT (L0 > 20): block writes until compaction catches up
- When backpressure activates:
- New
set()/put() calls block with a timeout
- HTTP API returns
429 Too Many Requests with Retry-After header
- Metrics show backpressure level
- Configuration:
resilience:
compaction_backpressure:
soft_limit: 10
hard_limit: 20
max_wait_ms: 5000
Labels
Description
When write throughput exceeds compaction throughput, L0 files pile up, causing read amplification to spike. ApexStore needs write backpressure.
Implementation
set()/put()calls block with a timeout429 Too Many RequestswithRetry-AfterheaderLabels