Sorry Michael, I think I misunderstood you. So.. you are using load balancer not to balance between different mosquittos but to balance between differents http servers to get the adress of the endpoint mosquitto itself? Ummm sound interesting.
Then you:
- Request the HTTP server through the load balancer.
- The HTTP server responses givin information about the Mosquitto that has to be used (based on the selected criteria).
- The client app connect to that Mosquitto.
We should do:
- Choose (from the backend) the Mosquitto we want the user to connect to next time if it is not connected at this moment. And send notifications to that Mosquitto. How? Doing some predictive algorithm that does not matter now.
- the app will request the HTTP server through the load balancer.
- The HTTP server responses giving information about the Mosquitto that has to be used.
- The client app connect to that Mosquitto.
It could works!! We will explore this, of course. need to know how to handle failovers and things like that.