quickwit-oss / quickwit

Cloud-native search engine for observability. An open-source alternative to Datadog, Elasticsearch, Loki, and Tempo.
https://quickwit.io
Other
6.99k stars 291 forks source link

Enforce shard rate limiting before validating documents #5159

Closed guilload closed 1 week ago

guilload commented 1 week ago

On Airmail, there is a ratio of approximately 3 persist request attempts for 1 ingest request received. However, we validate docs before actually enforcing rate limits per shard. Consequently, we waste a lot of CPU validating docs not persisted to disk. We should inverse the order with which the current logic is performed and apply rate limits before validation.