Reputation: 11
I'm trying to understand how exactly vertx should be configured for high availability.
I know that vertx supports high availability an is able to restart or redirect workload to another verticle running on cluster.
But how can it be solved for routing? My app is basically a web application and has one HTTP endpoint with a public URL - implemented as a standard Vertx webserver+router. Here's my problem - how to protect against crash of this web server/router? My understanding is that I cannot have multiple http servers serving the same routes, or can I?
Traditionally, I'd use load balancer and two or more redundant HTTP endpoints, but I'm not sure how to implement this in vertx.
Will using Kubernetes for production be able to handle load balancing of the HTTP endpoint?
Upvotes: 1
Views: 778
Reputation: 9128
If your application consists in a single verticle serving HTTP requests, you don't need Vert.x HA but a reverse-proxy / load-balancer in front of all the JVMs where your verticle is deployed.
If you have Kubernetes in production already: simply create a service in front of your replicas (often by selecting a label that your pods declare).
Otherwise, do not install Kubernetes just for this, it's overkill. There are many great opensource and commercial proxies/balancers (eg haproxy or ngninx).
Upvotes: 2