Consul WAN Join

369 views
Skip to first unread message

nss pradeep

unread,
Aug 29, 2016, 6:55:23 PM8/29/16
to Consul
Hi,

We have 2 datacenters each with 3 consul servers and several consul agents. Now we would like to perform cross datacenter queries so i was planning to join the consul servers in different datacenters over the WAN. I have below queries:-

1. If i take consul server 1 in DC1, Do i need to join the remaining 2 consul servers in DC1 at WAN level along with the 3 consul servers from DC2 ? or I need to join only the 3 consul servers from DC2 ?

2. At LAN level, when we query the server it will forward the request to the leader which will respond. What about when we try to query for a K/V which belongs to another datacenter ? Will the request go to any server in the other datacenter and then it gets forwarded to the leader which will respond ? or any server in the other datacenter can respond to the query ?

Thanks,
Pradeep NSS


nss pradeep

unread,
Aug 30, 2016, 11:47:33 PM8/30/16
to Consul
Hi,

Any thoughts on these queries.

Thanks,
Pradeep NSS

AoiK

unread,
Sep 1, 2016, 2:04:54 PM9/1/16
to Consul
Hi,

I have a similar set up in my environment, you have to join all of the consul servers in both DCs into a WAN cluster.
As default, a consul server is aware of only a node itself as wan cluster member. so what I've done is..
1. Join 2 consul servers in DC1 to consul server 1 in DC1
2. Join server 1 in DC2 to consul 1 in DC1
3. Join the rest of servers in DC2 to consul 1 DC2 

Actually it doesn't matter which server you'd use for a target to join as long as it's a part of the target wan cluster you'd like to join but this way was straight forward and easy to understand for me.

Hope this helps,
Aoi

nss pradeep

unread,
Sep 1, 2016, 4:22:22 PM9/1/16
to Consul
Hi,

Yes, i was able to query other datacenter only when i joined all the consul servers in one datacenter to all consul servers in the other datacenter. But the problem i see with this is scalability. If we have 3 consul servers per datacenters and we have around 10 datacenters then it will be 30 consul server mesh network so i wanted to check if this is the only approach or if there is any other way.

Thank you for sharing the feedback. Appreciate it :)

Thanks,
Pradeep NSS

James Phillips

unread,
Sep 20, 2016, 8:00:40 PM9/20/16
to consu...@googlegroups.com
Hi Pradeep,

Similar to the LAN joining, you only need to join each server to one
existing server in the WAN, not with all of them. Once it learns about
one other server in the cluster, it will learn about the rest. You can
use the free Atlas join for this, or have your WAN servers all join
some small common subset to link them all together, you don't need the
full n^2 join though.

When you request something from a remote datacenter, the request will
go to a local server first, and then any of the servers in the remote
datacenter. They might forward to the leader internally for a write
request, or if consistency settings require it. It's all handled under
the hood by Consul.

-- James
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in violation
> of those guidelines may result in your removal from this mailing list.
>
> GitHub Issues: https://github.com/hashicorp/consul/issues
> IRC: #consul on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Consul" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to consul-tool...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/consul-tool/4036be2c-5699-4200-b455-fbe5b4f529a0%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages