-
Notifications
You must be signed in to change notification settings - Fork 15
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
Consider a Read Only mode that enable read replica servers #111
Comments
Probably silly questions: are there read-only clients that could plausibly use this? or would we have to put something in front to route write calls to the write server? if we have to have a front-end proxy to route calls to the correct server, I think we should just use something like pgpool to handle that behavior at the database layer. If this is a thing that some clients would actually use, i'm not oppose but it would be nice to have a way for clients to detect that a particular endpoint is read only. |
yes, should be invisible to the client |
part of me wonders how much this is something we should expose as part of the server here because it assumes a certain deployment model. for example, we could accomplish this by restricting certain HTTP verbs (PUT, POST, DELETE) at a router/proxy level depending on our tooling. that said it is probably worth it to explore pgpool as you suggested and make it as easy as possible for folks to deploy and scale the service using this repo |
another option I was thinking about would be a config option for a read-only database. Then we can send read queries to that db (if it's set) and only send write requests to the primary. Then we dont need any magic sauce between us and the db. |
This could be as simple as something that is included in an implementer's guide with a reference example. As mentioned above, the server itself may not need to have a "read-only" mode as long as it never tries to write to the database for any |
A configuration flag could be added to disable write APIs to enable a single writer, multi reader deployment.
cc: @frankhinek @finn-tbd for more input
The text was updated successfully, but these errors were encountered: