问题
I am trying to deploy an Apache Ignite cluster in Kubernetes. The documentation suggests using TcpDiscoveryKubernetesIpFinder to facilitate the Ignite node discovery in a Kubernetes environment. However, I could not find this class in Apache Ignite for .Net. Is it migrated to .Net at all? If not, how can I use in my Net application? I am not very much familiar with Java.
If it is not possible, is there an alternative approach to implement node discovery in the Kubernetes environment without using TcpDiscoveryKubernetesIpFinder? Multicast is not available in Azure Virtual Network.
The range of available IPs in my Kubernetes subnet is 1000+ addresses so using TcpDiscoveryStaticIpFinder would not be very efficient. I tried to reduce FailureDetectionTimeout to 1 sec on my local PC to make it more efficient but Ignite generates a bunch of the "critical thread blocked" exception, allegedly each time when an endpoint is found unavailable. So I had to get rid of FailureDetectionTimeout.
I am using Azure Kubernetes Service and Apache Ignite 2.7 for Net. Thank you in advance.
回答1:
You can combine Java-based (Spring XML) configuration with .NET configuration.
Configure
TcpDiscoveryKubernetesIpFinder
in Spring XML file (see https://apacheignite.readme.io/docs/kubernetes-ip-finder)In .NET, set
IgniteConfiguration.SpringConfigUrl
to point to that file
The way it works is Ignite loads Spring XML first, then applies any custom config properties that are specified on .NET side.
来源:https://stackoverflow.com/questions/55388489/how-to-use-tcpdiscoverykubernetesipfinder-in-apache-ignite-net