-
Notifications
You must be signed in to change notification settings - Fork 7
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
Access from outside the compose application? #4
Comments
The general assumption is that the first container created will be the read/write primary. You could anticipate its auto-created CNS record with the |
Ah, thank you! I never remember the |
We had discussed a feature to support adding/removing CNS names at runtime (as would be necessary to use CNS when an instance is promoted to primary to replace a failed primary), but I don't believe this was ever implemented IIRC. If you're looking for a one-off answer, I'd check your Consul cluster to see which pg instance has the lock as the primary. If you're looking to do this at scale, I'd strongly consider implementing Consul-based dynamic discovery/configuration to the client app. Second to that, a proxy could perform that task, running either in the client instance, the pg host instance, or something in between. |
I always forget about foo.inst CNS records. But how does that help with failover?
…Sent from my iPhone
On Jun 28, 2022, at 06:18, teutates ***@***.***> wrote:
The general assumption is that the first container created will be the read/write primary. You could anticipate its auto-created CNS record with the $NAME.inst.$UUID.cns.domain record.
For example:
postgres-db-1.inst.fb75e85c-4e77-4e18-bb36-4b3e272baddd.basement.cns.coyhile.com
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
|
With no CNS names setup or anything else, how would one determine the address of the master in order to access the database? If I add a label: triton.cns.servivces=mydb, that's set on every instance, not just the writeable instance.
The text was updated successfully, but these errors were encountered: