Accessing NATS on Kubernetes: LoadBalancer vs Seed URL for Failover #6094
mohamedsaleem18
started this conversation in
General
Replies: 2 comments
-
When using the load balancer type, I would recommend just letting the clients reconnect to the same load balancer endpoint. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you for quick response. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
NATS.io provides LoadBalancer as one of the methods for accessing a NATS server (cluster) deployed on OpenShift. However, the NATS documentation recommends using seed URL for NATS clusters. The expectation when using a seed URL is that it allows for failover to a secondary NATS server. Can you suggest the recommended approach for client applications to handle failover while using loadbalancer as service type?
https://github.com/nats-io/k8s/tree/main/helm/charts/nats
Excerpts from the link:
Accessing NATS
The chart includes two services by default: service and headlessService.
service
This service is intended to be accessed by NATS clients. By default, it is a ClusterIP service, but it can easily be changed to another service type.
The nats, websocket, leafnodes, and mqtt ports will be exposed through this service by default if they are enabled.
Example: to change the service type to a LoadBalancer:
Beta Was this translation helpful? Give feedback.
All reactions