-
Notifications
You must be signed in to change notification settings - Fork 22
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
Horizontal scaling and multiple backends #617
Comments
It can be scaled horizontally. We are using Shedlock for locks when running more than one instance of Lighter. So generally having a few Lighter instances could help with HA but there are some limitations:
Regarding the separate Lighter configurations and separate backends, it could probably be done. But I would recommend separating the Lighters logically (separate DBs and endpoints configured) to get better visibility and debugging options. |
I don't understand the lock strategy of Lighter... The locks are not there to avoid Leader election between several Lighter instances ? As I understand, the lock is used to avoid concurrency between update tasks: If so, would it be possible to have a queue with a single thread doing update tasks and another queue with more threads for the reads or the concurrent-safe tasks ? Regards |
You are right regarding the lock strategy. Current implementation is just a simple way to ensure that there is some kind of redundancy but it is far from optimal. Of course it's possible to implement different concurrency mechanisms but it takes time in both development and additional effort to test it. We are always open for contributions though :) Closing for now. |
Hi,
If the DB is hoster in a postgres instance isolated from Lighter, can Lighter be scaled horizontally ?
For exemple :
Regards
Julien
The text was updated successfully, but these errors were encountered: