superfly / corrosion

Gossip-based service discovery (and more) for large distributed systems.
https://superfly.github.io/corrosion/
Apache License 2.0
717 stars 22 forks source link

Separate Bookie instantiation to listen on public API faster #131

Closed jeromegn closed 10 months ago

jeromegn commented 10 months ago

Loading the full bookkeeping of versions in memory can be time and resources consuming. This slows down accepting and processing public API endpoints such as transaction, queries, subscriptions, etc. and can create odd-looking behaviour.

This PR tries to spawn as many tasks as possible (all the ones that don't need access to the full bookkeeping), seed Bookie and then launch the tasks that need complete in-memory bookkeeping.

This should significantly improve startup times. It should be instantaneous for nodes that don't have any local versions.