将缓存条目放入特定的Ignite Server [英] Putting cache entries to specific Ignite Server

查看:45
本文介绍了将缓存条目放入特定的Ignite Server的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个由五个服务器(例如A,B,C,D和E)组成的Ignite数据网格.已在这五台服务器之间分配了分区缓存,备份数量设置为1.

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.

我想在此分区缓存中存储1亿个条目.但是,我想控制我的缓存条目到Ignite服务器的分区.

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.

是否可以指导Ignite客户端在特定服务器上放置一个缓存条目(例如E)?

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

推荐答案

做到这一点的唯一方法是实现自己的

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.

这篇关于将缓存条目放入特定的Ignite Server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆