-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
some questions about consul #1916
Comments
Hi @hehailong5 please see below:
Normally you'll run a separate set of Consul servers (usually 3 or 5) and then run the Consul client agent on every other machine in your infrastructure. Applications always talk to the local Consul client agent, which will automatically forward requests to and keep track of the Consul servers. The Consul servers provide stable storage for the catalog, key/value store, and provide coordination for things like locks and semaphores. The Consul client agents on each other machine manage registering local services on that machine, and provide interfaces to Consul for applications on that machine (HTTP or DNS). There's usually no need to have redundancy at the Consul agent level on each machine, as that's part of the same failure domain as the machine itself.
The Consul client agent will run the health check locally and update the Consul servers with the results.
Consul has a built in node health check called Hope that helps! I'll close this out but feel free to re-open if you need any more clarifications. |
Hi, Regarding #1, do you mean if the Consul client crash or the network breaks down between, the application cannot use the consul anymore util the Consul client comes back online? I thought there is a mechanism for Consul clients to prevent single point failure.. in my case, the application connects to the Consul client remotely via HTTP 8500. |
There's no mechanism on the client side to prevent a single point of failure because the machine it's running on is also a single point of failure. Consul is highly available on the server side with >= 3 servers, so if one of them dies or has its network disrupted then another server will take up leadership and the cluster can continue to operate. It's not recommended to connect to the consul client remotely as then you'll need to manage a load balancer and the list of healthy clients to connect to. If you run the Consul agent on each machine then it manages all this for you. |
Thanks for the clarification! that makes clear. thank you! |
Hi, |
The |
Thanks for the answers. Very clarifying |
Hi @slackpad, |
I know this place is only for real issues, but I don't have access to google servers in my country (thus not able to use IRC and mail list), i have to leave my questions here. thanks in advance for the reply.
in this case (having multiple consul clients), how do I configure my consul registration tool? usually it requires to specify only one endpoint. what if this endpoint is down? will it automatically forward the registration request to an alive consul client in the cluster?
The text was updated successfully, but these errors were encountered: