Route https (websockets) connections with HAProxy

I have a need of doing a variant of this https://www.haproxy.com/blog/route-ssh-connections-with-haproxy but with HTTPS (mix of websockets and normal https) termination and route to backends based on subdom.dom.topdom - using ssl_fc_sni (this SSH example is working for me if i provide internal IP from the client.)

I have it (the https/wesocket routing working perfectly with ACL’s and actions - but I have around 1500 backend servers so it’s starting to be a bit of a PIA to manage

i wish i could do one of the following:

- 1 frontend and 1 backend
use the fqdn and resolve it internally (to get the internal IP) and connect to the server,
advantage here is zero HA-admin after inital setup

OR

- 1 frontend and 1500 backends
use the fqdn to name a backend and connect to it,
advantage here is I can use HA to monitor the servers and their status, and have fallback backend

any example or links to point me in the right direction would be helpful :slight_smile:

I use haproxy 2.9 on pfsense box - but ill be happy to swap to a dedicated HA if needed