英文:
Apache Ignite cluster setup
问题
我一直在尝试使用Apache Ignite设置一个集群。这个集群将具有缓存,并且还将实现服务网格。
我希望根据节点的启动和连接到集群来动态分配角色给每个节点。
类似于,如果节点1已启动,则将其设置为缓存,如果有2个节点保存缓存,则在第三个节点上部署服务。
代码基础对所有节点都是相同的。
这是否可能实现?如何实现?
将不胜感激任何帮助。
英文:
I have been trying to setup a cluster using Apache ignite. This cluster will have cache and will also implement service grid.
I want to dynamically assign roles to each node based on the node startup and connection to cluster.
Something like, if node 1 is up set it as cache and if we have 2 nodes that hold the cache then deploy the service on the third node.
The code base is same for all nodes.
Is this possible to achieve? How can it be done?
Any help will be appreciated.
答案1
得分: 0
可以使用Node Filters来实现,具体信息请查看以下链接:
https://www.gridgain.com/docs/latest/developers-guide/configuring-caches/managing-data-distribution
还有一个AttributeNodeFilter,可以在不需要额外编码的情况下实现这一功能,详细信息请查看以下链接:
https://www.gridgain.com/docs/latest/developers-guide/configuring-caches/managing-data-distribution#filtering-nodes-by-attributes
英文:
Yes, it can be done using Node Filters:
https://www.gridgain.com/docs/latest/developers-guide/configuring-caches/managing-data-distribution
There is an AttributeNodeFilter that can done this without additional coding:
https://www.gridgain.com/docs/latest/developers-guide/configuring-caches/managing-data-distribution#filtering-nodes-by-attributes
答案2
得分: 0
Apache Ignite假定所有节点是同质的。您可以拥有节点属性,但依赖特定节点执行特定任务并不常见。
您可以将自己的代码与Apache Ignite(可嵌入)一起使用来实现该工作流程。
英文:
Apache Ignite assumes that all nodes are homogenous. You can have node attributes, but relying on a specific node to do a specific task is uncommon.
You can have your own code alongside Apache Ignite (which is embeddable) to implement that workflow.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论