haProxy in LXC

Marx

New Member
Oct 16, 2020
18
2
3
52
Hi
I'm coming from Docker, so I'm new to LXC containers and Proxmox. I have Galera MariaDB cluster - on each Proxmox node sits LXC with MariaDB. Now I want to make it accessible under single domain/IP. I see two possibilities:
- use DNS name with multiple IPs assigned. As I know, every time DNS server is queried about such domain, it return next IP, which makes it very simple load balancer
- use haProxy software - then I can create LXC container, install haProxy inside and configure it, but how configuration should look like? And how to make sure that, even if a node with LXC die, and it'll be moved over to different node, it still will be accesssible?

The aim is to have high availabiliy and load balancing, and I feel, maybe I should make it outside cluster?
 
Hi,

DNS and also HA-Proxy are not always clustered. And if not you have on this stack a single point of failure.

Assume you have DNS and HA-Proxy redundant the I would prefer HA-Proxy(the config is simple and can be found in may Blogs). Second DNS. If this is not the case you could use e.g. pacemaker to create an HA IP.
 
I've ended up creating plain Debian LXC, installing ClusterControl on separate temporary LXC with Docker, than allowing ClusterControl to create haProxy configuration on this Debian LXC. I can in future reuse haProxy for other use cases, so it's good solution for me.

I for the first time hear about VRRP but first look at google says it's something about routers.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!