The following are the steps that I executed to deploy the “zero” cluster and the “alpha” cluster
(1) deploy the zero cluster
on VM 1: dgraph zero --my=<zero-1-address>:5080 --idx=990 --replicas 3
on VM 2: dgraph zero --my=<zero-2-address>:5080 --peer=<zero-1-address>:5080 --idx=991 --replicas 3
on VM 3: dgraph zero --my=<zero-3-address>:5080 --peer=<zero-1-address>:5080 --idx=993 --replicas 3
at the end, from VM 1 (with zero-1-address), I can see the following lines:
raft_server.go:185] [991] Done joining cluster with err: <nil>
raft_server.go:185] [993] Done joining cluster with err: <nil>
So I conclude these three VMs are forming a zero cluster, with idx {990, 991, 993}
(2) deploy the alpha cluster
On VM 4:
dgraph alpha --lru_mb=4096 --my=<alpha-1-address>:7080 --zero=<zero-1-address>:5080
Then it displays:
[groups.go:695] Got address of a Zero leader: <zero-1-address>:5080
[groups.go:708] Starting a new membership stream receive from <zero-1-address>:5080.
Correspondingly on the VM 1 (zero-1), it shows:
[zero.go:495] Connected: id:1 group_id:1 addr:"alpha-1-address:7080"
on the VM 2 (zero-2) and 3 (zero-3), both show:
[pool.go:140] CONNECTED to alpha-1-address:7080
So I conclude that this alpha node 1 has been connected to the zero cluster.
On VM 5:
dgraph alpha --lru_mb=4096 --my=<alpha-2-address>:7080 --zero=<zero-1-address>:5080
then it displays:
[pool.go:140] CONNECTED to zero-1-address:5080
[groups.go:112] Connected to group zero. Assigned group: 1
Correspondingly, in VM1, VM2 and VM3, all show that this alpha-2 has been connected, similar to what is shown for alpha-1.
On VM 6:
dgraph alpha --lru_mb=4096 --my=<alpha-3-address>:7080 --zero=<zero-1-address>:5080
Then it shows:
[ pool.go:140] CONNECTED to 10.148.216.44:5080
[ groups.go:112] Connected to group zero. Assigned group: 1
Correspondingly, in VM1, VM2 and VM3, all show that this alpha-3 has been connected, similar to what is shown for alpha-1.
(3) to launch the batch loader
on VM 7:
dgraph live -r 1million.rdf.gz --zero <zero-1-address>:5080 -c 1
Then I receive the following error message on the VM 7’s shell:
“While trying to setup connection to Dgraph alpha. error: context deadline exceeded”
I also change “–zero” to zero-2-address and zero-3-address, for the command of “dgraph live”. But I received the same error message on deadline exceeded.
In terms of network configuration: VM1, VM2 and VM3 are in one datacenter, and VM4, VM5, VM6, and VM7 are in a different datacenter. Across these two datacenters, the round-trip latency is no more than 20 milliseconds ( I have repeated the above dgraph live commands many times already and the same error shows up each time)
In terms of the VM resources, VM1, VM2 and VM3 each has 2 CPUs and 4 GB RAM. VM4, VM5, VM6, and VM7 each has 4 CPUs and 8 GB RAM.