holmes
February 17, 2015, 6:08am
1
Hi,
Suppose I have 3 datacenters : dc1, dc2, dc3.
Namespaces in dc1 : ns1, ns2
Namespaces in dc2 : ns1, ns2, ns3
Namespaces in dc3 : ns3
Now , I want data in :
[dc1:ns1] to be replicated to [dc2:ns1] but not dc3
[dc2:ns2] replicated to [dc1:ns2] nut not [dc3]
and data in [dc2:ns3] to be replicated to [dc3] but not [dc1]
How do i configure this type cluster/namespace ?
petter
February 17, 2015, 7:05am
2
Hi Holmes,
The following example configuration would get this done:
DC1
xdr {
enable-xdr true
namedpipe-path /tmp/xdr_pipe
digestlog-path /opt/aerospike/data/digestlog 100G
errorlog-path /var/log/aerospike/asxdr.log
local-node-port 3000
info-port 3004
datacenter dc2 {
dc-node-address-port IP-ADDRESS PORT
}
}
namespace ns1 {
enable-xdr true
replication-factor 2
memory-size 4G
default-ttl 30d
storage-engine memory
xdr-remote-datacenter dc2
}
namespace ns2 {
replication-factor 2
memory-size 4G
default-ttl 30d
storage-engine memory
}
DC2
xdr {
enable-xdr true
namedpipe-path /tmp/xdr_pipe
digestlog-path /opt/aerospike/data/digestlog 100G
errorlog-path /var/log/aerospike/asxdr.log
local-node-port 3000
info-port 3004
datacenter dc1 {
dc-node-address-port IP-ADDRESS PORT
}
datacenter dc3 {
dc-node-address-port IP-ADDRESS PORT
}
}
namespace ns1 {
replication-factor 2
memory-size 4G
default-ttl 30d
storage-engine memory
}
namespace ns2 {
enable-xdr true
replication-factor 2
memory-size 4G
default-ttl 30d
storage-engine memory
xdr-remote-datacenter dc1
}
namespace ns3 {
enable-xdr true
replication-factor 2
memory-size 4G
default-ttl 30d
storage-engine memory
xdr-remote-datacenter dc3
}
DC3
namespace ns3 {
replication-factor 2
memory-size 4G
default-ttl 30d
storage-engine memory
}
Hope that helps.
Petter
holmes
February 17, 2015, 10:15am
3
Thanks Petter,
+1.
Its definitely helpful.
Regards,
Holmes