spring-cloud / spring-cloud-consul

Spring Cloud Consul
http://cloud.spring.io/spring-cloud-consul/
Apache License 2.0
813 stars 541 forks source link

The question about consul HA and version #285

Closed baiyuang closed 6 years ago

baiyuang commented 7 years ago
  1. Which version of consul corresponds to spring-cloud-consul?
  2. When I use the spring-cloud-consul registration services, it will automatically send the request/v1 / agent/service/register and the request parameters for the timeout rather than DeregisterCriticalServiceAfter, is this a bug or version?
  3. I built a consul datacenter, including three server, so when I was a service registry, The "spring.cloud.consul.host" can only write one consul server address, such as server-1. if the server-1 hang up, is there any way to HA?
spencergibb commented 7 years ago

1) Generally we track whatever version of consul https://github.com/Ecwid/consul-api uses. 2) DeregisterCriticalServiceAfter is only available in 1.2.0.M1 3) We follow consuls recommended architecture of connecting to a local agent, and let the agent connect to the servers. There is no support for multiple servers.

baiyuang commented 7 years ago

tks! If I connecting to a local agent, how to support multiple data centers?

spencergibb commented 7 years ago

by default consul queries the local data center.

baiyuang commented 7 years ago

If I have two datacenters, my apps needs to connect two datacenters, how to do ?

spencergibb commented 7 years ago

Consul has different behaviors for cross-datacenter calls. What are you trying to do?

wynn5a commented 7 years ago

@spencergibb If I want to call service in another data center using client load balance, any suggest for using Ribbon or Feign? If I cannot call the service directly because the IP address of service hosts cannot access across data centers, how to call service in another data center using spring cloud consul? Any suggestions would be appreciated.

spencergibb commented 7 years ago

I don't have any suggestions.

archer-christ commented 7 years ago

How to config multi consul agent address like eureka

eureka.client.serviceUrl.defaultZone: http://10.2.61.201:9000/eureka/,http://10.2.61.202:9000/eureka/
spring-projects-issues commented 6 years ago

Closing due to age of the question. If you would like us to look at this issue, please comment and we will look at re-opening the issue.