zalando / nakadi

A distributed event bus that implements a RESTful API abstraction on top of Kafka-like queues
https://nakadi.io
MIT License
958 stars 292 forks source link

Cache ordered partitions per event type #1439

Closed a1exsh closed 2 years ago

a1exsh commented 2 years ago

Move sorting out of the hot path on batch publishing.

Based on findings from #1398

a1exsh commented 2 years ago

~Note that this makes us sort partitions for random-partitioned event types as well, but also only once per publishing batch.~

~We can improve it further by refactoring the PartitionStrategy interface and the PartitionResolver component, but I don't see a clean way to do that for now.~

Now moved the fetching and ordering of partitions all the way up to the event type cache.

antban commented 2 years ago

:+1:

a1exsh commented 2 years ago

:+1: