Reputation: 135
I am testing Apache Ignite cluster using .NET thin client. I've launched 3 ignite instances on local machine using dotnet launcher ("platforms\dotnet\bin\Apache.Ignite.exe"). The instances found each other and took 10800, 10801, 10802 ports automatically. In my test application I create 100 caches with 1000 records in each cache and then try to get elements from caches sequentally. The problem is that client makes requests to different nodes only if I specify 3 adresses manually "127.0.0.1:10800..10801".
var configuration = new Core.Client.IgniteClientConfiguration
{
Endpoints = new List<string> { "127.0.0.1:10800..10802" },
EnablePartitionAwareness = true
};
If I specify "127.0.0.1" or "127.0.0.1:10800" request I made to only one node.
var configuration = new Core.Client.IgniteClientConfiguration
{
Endpoints = new List<string> { "127.0.0.1:10801" },
EnablePartitionAwareness = true
};
I've checked client requests with WireShark:
Can I specify only one node if I want to use PartitionAwareness feature?
Can thin client discover other nodes automatically?
We plan to autoscale application depending on memory used, so all node adresses and ports will not be known at client startup.
Upvotes: 1
Views: 273
Reputation: 135
Checked thin client auto-discovery feature in Apache Ignite 2.9.0 and it works well: thin client sends requests to all 3 instances directly.
Upvotes: 0
Reputation: 9006
Adding to the answer from Alexandr: you can try thin client discovery feature in a pre-release build: https://www.nuget.org/packages/Apache.Ignite/2.9.0-alpha20200710
The feature is enabled when IgniteClientConfiguration.EnablePartitionAwareness
is true
. You can provide only one server address initially, Ignite will discover other servers and connect to them, then keep the cluster information up to date as nodes join or leave.
Keep in mind that the process is asynchronous and lazy - when you use Ignite APIs, it receives cluster updates. When you don't do anything, Ignite sits idle as well.
Full documentation is coming with the official release.
Upvotes: 3
Reputation: 2425
Right now it's required to list all addresses for your connection string.
There is an upcoming Thin client discovery feature, that will track the topology changes and save the snapshot on a client-side. Implementation details: https://cwiki.apache.org/confluence/display/IGNITE/IEP-44%3A+Thin+client+cluster+discovery
According to the ticket, the target release is 2.9. I think, the target date is somewhere in September.
Upvotes: 3