0

So I understand data can be colocated together by use of an affinity function.

My questions is, if it is possible to force data to be placed in a particular node? And then force rebalancing if I need that partition to be moved to another node.

This would be useful for a scenario where I have a client that will be using a server the most to access his data and there'd be an ignite node very close, network wise, to this server. I'd like the data for this client to be as close as possible to where it's used.

But now say this client moves to another server, I'd like to be able to move his data to a node that is closer to the new server.

Is this behavior possible in Ignite?

1 Answers1

2

You can use a node filter to limit which nodes store data, but you can't easily force data to a specific node.

But the good news is that's really a design anti-pattern. You should let Ignite figure it out for you.

Part of the reason for that is that you appear to assume that a client connects to a server. That's not the case. Ignite nodes are peers. Any node can connect directly to any other in the cluster. (Perhaps you have a "stretched cluster," one that's spread across multiple data centres? Because a cluster is peer-to-peer, this is generally not recommended.)

Stephen Darlington
  • 51,577
  • 12
  • 107
  • 152
  • This is not true. My clients connect to a specific server, which itself is the ignite peer. This server is in the same machine or low latency network as the node that should contain this user's data. Allowing ignite to make the selection, even with colocation, the user data could be placed in another machine, which makes no sense. Could you elaborate how filters would be a solution for this? – nemesis_567 May 03 '22 at 14:26
  • 1
    You don't put the client near the data. You co-locate your compute. [Send the code](https://ignite.apache.org/docs/latest/distributed-computing/collocated-computations) to where the data is already located. – Stephen Darlington May 03 '22 at 17:01
  • I added a link to node filters. But note that restricting to a single node will result in data loss in the event of a node failure. Thick clients can open connections to any node in the cluster, even if you only specify one in your configuration. – Stephen Darlington May 03 '22 at 17:03