-
Notifications
You must be signed in to change notification settings - Fork 98
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
River leader in multi-service ecosystem #742
Comments
I'm assuming the different microservice workers wouldn't know how to work each others jobs would they? Do you get around this by using separate queues? @bgentry I suppose we could address this by exposing the |
Are each of your services running on their own independent Postgres schema/namespace? I had always envisioned there being just a single leader in a given namespace, so if you want to have isolated services w/ independent jobs they would live on separate schemas and thus be able to have their own leader and their own maintenance processes for their own respective schema. Our multi schema support is still held back by sqlc not supporting schemas other than as a connection param, but once we get past that we should be in a better place. |
Thanks both @brandur and @bgentry. |
Hey folks,
I've the following use case and I would like to hear your opinion on a limitation I faced once starting to tackle it.
I'm dealing with microservices architecture where N services would like to schedule periodic jobs (independently).
The services are compute distributed with centralized single DB instance (multi schema).
Meaning - each service creates a river client and set its internal scheduling jobs (worth to mention, each service defines its scheduling job kind).
In this scenario with the current leader election process there is a race between the services on the leadership ownership.
Let's assume service N_1 assigned to be the leader, as a result services N_2....,k schedule jobs will be starved (and actually won't run).
Are you aware of this limitation?
There is an alternative to achieve the requirements described aforementioned?
Thanks in advanced.
The text was updated successfully, but these errors were encountered: