Data Synchronization Across Data Centers
If you have your application running in different data centers in active-active manner (traffic is served by all data centers simultaneously), you might want them to use the same datasource for up-to-date data processing.
In-memory data grid could be a good solution for sharing information across multiple data centers in a real time.
And there are several ways how to build up such synchronization.
Two separate In-Memory Data Grids running in synchronized mode
All most popular In-Memory Data Grid applications support data replication over Wide Area Network (WAN).
Such data synchronization model is preferable because of following pross:
- each data center has it's own independent architecture
- maximum bandwidth is configurable
- limited number of ACL to be opened between data centers
- communication between clusters could be easily encrypted
Single In-Memory Data Grid
If, for some reason, there is no ability to spin up a separate IMDG cluster in each of your data centers, then you can think about to have your application connected directly to the data grid running in one of the data centers:
However, such communication model has significant drawbacks:
- strong dependency on data center which has running shared data grid
- network bandwidth could be overflowed if you have a lot of applications got connected to the shared data grid
- number of ACL to be opened between data centers depends on applications' amount you'd like to have connected to the shared data grid
- all communication with IMDG should be configured via proxy server running in-front of data grid
- custom solution for messages' encryption could be required
Shared In-Memory Data Grid
It’s strongly not recommended to spread your data grid cluster across multiple data centers. Anyway, due to product licence restrictions you might want to have your storage nodes from one data center being communicated with storage nodes from another data center forming one single cluster:
This model could be very unstable because of network latency, and cluster’s communication between nodes from separate data centers could be interrupting. Also, inter-nodes communication is not secure, so your data could be intercepted and compromised.