Putting cache entries to specific Ignite Server

孤人 提交于 2019-12-24 07:08:25

问题


I have an Ignite data grid of five servers(say A,B,C,D and E). A partitioned cache has been distributed across these five servers with the number of backups set as 1.

I want to store 100 million entries in this partitioned cache. But, I want to control the partitioning of my cache entries to the Ignite servers.

Is it possible that I can direct my Ignite client to put a cache entry on a particular server (say E)?


回答1:


The only way to do this is to implement your own Affinity Function instead of the ones provided out of the box. However, I would encoredge you to rethink this approach because it's not scalable. Affinity functions included in Ignite are designed to provide even distribution on any set of nodes, so you can dynamically scale up and down whenewer you need this. Your approach is much less flexible.

Also I would recommend you to go through documentation page about Affinity Collocation. Very likely this will give you hints on how to implement your logic in a better way.

And fincally, can you give some more details about your use case? I will be happy to give some advice on how to approach it.



来源:https://stackoverflow.com/questions/41115028/putting-cache-entries-to-specific-ignite-server

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