Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscriptions pool #192

Open
alexeyzimarev opened this issue Mar 6, 2023 · 2 comments
Open

Subscriptions pool #192

alexeyzimarev opened this issue Mar 6, 2023 · 2 comments
Labels
perfornamce Ways to improve performance subscriptions

Comments

@alexeyzimarev
Copy link
Contributor

alexeyzimarev commented Mar 6, 2023

ESDB has this smart functionality that allows maintaining less subscriptions if all the event handlers are live. In Eventuous context it would work like this:

  • Each subscription (group of handlers) is independent and can start from its own checkpoint
  • When subscription groups are catching up, they keep running independently
  • When a group starts to run live it switches to a single catch-up subscription, which runs live. The catch-up subscription used by the group gets disposed.
  • When all the groups run live, there's only one physical catch-up subscription running
  • If a particular group starts lagging behind, it switches to its own catch-up subscription

As a result, when all the groups are running live, there's only one physical catch-up subscription to the database, so there's less traffic and less read pressure on the database.

From SyncLinear.com | EVE-38

@alexeyzimarev alexeyzimarev changed the title [EVE-37] Subscriptions pool [EVE-38] [EVE-37] Subscriptions pool Mar 6, 2023
@alexeyzimarev alexeyzimarev changed the title [EVE-38] [EVE-37] Subscriptions pool [EVE-38] Subscriptions pool Mar 7, 2023
@alexeyzimarev
Copy link
Contributor Author

Thoughts about ground work:

  • Subscription could have a sliding window of events (past) with time-based expiration
  • Separate subscription hosts from handler groups?
  • Allow groups to move between hosts

@alexeyzimarev alexeyzimarev added the perfornamce Ways to improve performance label Mar 7, 2023
@alexeyzimarev alexeyzimarev changed the title [EVE-38] Subscriptions pool Subscriptions pool Jun 17, 2024
Copy link

linear bot commented Aug 16, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perfornamce Ways to improve performance subscriptions
Projects
None yet
Development

No branches or pull requests

1 participant