hazelcast / hazelcast-kubernetes

Kubernetes Discovery for Hazelcast
Apache License 2.0
174 stars 99 forks source link

I have two Kubernetes clusters. I have created hazelcast-cluster with members A,B,C in East AKS cluster and hazelcast-cluster with members D,E,F in West AKS cluster. Now I want A,B,C to discover D,E,F. How can I do that? #285

Open AayushiKhandelwal123 opened 3 years ago

AayushiKhandelwal123 commented 3 years ago

Both Kubernetes clusters are in different network. I saw this https://github.com/hazelcast/hazelcast-kubernetes/issues/141 but it has been closed. So I was looking for a solution other than using hazelcast enterprise feature or having one AKS cluster in two regions.

leszko commented 3 years ago

So you'd like to have one Hazelcast cluster stretched across multiple Kubernetes clusters, right?

Technically, you could do it by using host network or host port (but it's not a recommended approach). Also, if you have one Hazelcast cluster across multiple regions, the performance will be terrible, so you shouldn't do it at all.

The proper way to do it is to have 2 separate Hazelcast cluster with the WAN replication in between. WAN, however is an enterprise feature. If you're interested more in WAN, please check this guide: https://guides.hazelcast.org/kubernetes-wan/.

AayushiKhandelwal123 commented 3 years ago

@leszko I am pretty much naive with Hazelcast. Going for enterprise feature is not an option for me. So please explain more on using host network ( I tried TCP/IP discovery strategy but it didn't work) Please tell does the below approach can work? Have two clients( one in the East Region and one in the West Region) for each Hazelcluster. Now let's assume I have East Hazelcast cluster ( members A, B, C) and one hazelcast client (Client X) in the East region. Similarly, I have West Hazelcast cluster ( members D, E, F) and one hazelcast client (Client Y) in the west region. Now, can Client X or Y get/put data in East Hazelcast Cluster as well as West Hazelcast Cluster using client REST API?

paritalagt commented 3 years ago

I also have the same problem please let us know the solution if its possible

paritalagt commented 3 years ago

@AayushiKhandelwal123 and @leszko , please let me know if you have any solution .

AayushiKhandelwal123 commented 3 years ago

Hi,

No didn't get the solution in free hazelcast version. Even hazelcast team told me to go for enterprise hazelcast WAN feature.

On Mon, Feb 8, 2021, 11:05 PM paritalagt notifications@github.com wrote:

@AayushiKhandelwal123 https://github.com/AayushiKhandelwal123 , please let me know if you have any solution .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hazelcast/hazelcast-kubernetes/issues/285#issuecomment-775316644, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIJSF5RVJAVJM3ZLC6WCF5LS6AOHVANCNFSM4U7VPGSA .

dunstanmillwright commented 3 weeks ago

Updating old issue. as we have similar situation using enterprise HZ.

Wondering whether we can use stretched cluster using TCP proxy thru HTTPROXY kubernetes definition. Basically exposing public addressable ingress endpoint for respective cluster and route the traffic to respective pod by using custom POD selector in the respective K8s cluster.