Replication multi datacenters

I’m planning to use CockroachDB on a scenario where I have a cluster divided in three different places, one on AWS and two different datacenters.

Both datacenters have communication with AWS but one datacenter do not communicate with another because of security reasons.

Is it possible to create a cluster on that way where some cluster nodes can’t access directly some of the other nodes? Using a path by the nodes of AWS each node is accessible by others, but not directly.

If it’s possible, is there some specific configuration that I should do?

Thanks.

Hi lhespanha,

To clarify, there are three data centers, lets call them West, Central, East. W and E cannot communicate, but C can communicate with both W and E?

W---x---E
 \     /
  \   /
   \ / 
    C

Regarding the network communication limitations between W and E, would the database nodes in the data centers have externally visible VIP? For example, each database node could be using 192.168.x.x internally, but externally, each node has unique external IP that applications can access?

App     App 
 |       |
 v       V

 W---x---E
  \     /
   \   /
    \ / 
     C

     ^
     |
    App

Regards,

Hi Robert,

On our setup the application and the database run inside of an internal network (for both app and database), the W and E can access C over a VPN connection

App W = 192.168.2.x
App E = 192.168.1.x
App C = 192.168.3.x


App W   App E 
 |       |
 v       V

 W---x---E
  \     /
   \   /
    \ / 
     C

     ^
     |
   App C

Andre and Lhespanha,

CockroachDB can support this configuration. There is a detailed writeup and an example at https://github.com/cockroachdb/docs/issues/2538. This pattern is often used for multi vendor cloud deployments.

Regards,