Need suggestion on 3 data center deployment (we want active/active/active if possible)

(Feng Qu) #1

We have 3 data centers(they can be configured in one region or two regions or 3 regions) and we want to achieve HA, high throughput and low latency.
• Is there a way to make all 3 data center local read/write?
o If not, can we make 2 data center to provide local read/write?
 If so, what’s usage for 3rd data center, can we read from it?
 If not, can we make it one data center local read/write and other two data center read?

Appreciate your feedback.

(Meng Xu) #2

FDB only support write to one data center (the primary data center). This is necessary to achieve serializable snapshot isolation without relying on precise time synchronization across DCs.

FDB supports local reads from all these three DCs. If the read comes from the remote DC, it needs to get the read version across WAN, and then it directly gets the data from the storage server in the local (i.e. remote) DC.

(Alec Grieser) #3

In particular, if one sets the “data center ID” database option, the client will prefer to use fdbserver processes with that same data center ID when performing reads: https://apple.github.io/foundationdb/api-python.html#database-options

That parameter is set at fdbserver startup, and it can be set to basically whatever is useful to the administrator (I think probably with some maximum length).

Note that the configuration called three_datacenter in FDB (which uses, as you might expect, three data centers) is not particularly optimized to minimize WAN traffic, so as a result, it might provide higher latencies than one would expect and throughput can suffer just due to the volume of cross-DC traffic that is done. Region configurations do a better job about being more careful about when data are shipped across the WAN, but they currently only support two datacenters: https://apple.github.io/foundationdb/configuration.html#configuring-regions

(Feng Qu) #4

Meng/Alec, thanks for feedback.