Controlled partitioning and MapStore

可紊 提交于 2020-01-16 16:53:46

问题


Lets say, I have several Hazelcast members (servers) spread across world (e.g. Germany, Russia and etc).

It was required to store/split data in database by region and all data should be accessible from any server via IMap backed by MapStore.

I recently read this article which fulfills my requirement, but I am not sure about how will MapStore behave.

Crucial moment is that, if member1 (e.g. Russia) requests data from IMap with key owned by member2 (e.g. Germany), on which side MapStore.load() will be called?


回答1:


You should not split members of the same cluster across different data centers. Members of a cluster depend on a regular heartbeat message to detect the health of the cluster; wide area networks cannot reliably deliver these in a consistent fashion and you will almost certainly have network partition issues (split brain syndrome).

Each data center (Germany, Russia, etc.) should have a separate cluster with region-specific maps. These maps can then be replicated (WAN replication) to the remote data centers both for disaster recovery and to provide a geographically close server to support users in that region needing access to the other region's data.

Since the data in the database is already split by region, matching this split on the Hazelcast side means that the MapLoader will always be loading from a database in the same location.



来源:https://stackoverflow.com/questions/56475441/controlled-partitioning-and-mapstore

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!