Hi all, I’m currently working on a smart sensor deployment where multiple ESP32 devices stream data over MQTT and HTTP to a central server. Inspired by this guide which shows how to build an ESP32-based IoT system with MQTT integration and real-time monitoring, I started thinking about how to scale the backend more effectively:
https://www.theengineeringprojects.com/2021/11/esp32-mqtt.html
To handle growing traffic, I’m considering HAProxy as a lightweight reverse proxy and load balancer between the MQTT broker (Mosquitto) and a REST API used for data visualization. I’ve reviewed similar approaches from the Eclipse IoT documentation and this HAProxy blog post on balancing WebSocket connections, but I’m not sure how well HAProxy handles frequent short-lived IoT connections, especially from constrained clients.
Has anyone used HAProxy in a similar IoT context? Any tips for optimizing connection reuse, TLS offloading, or using stick-tables for session persistence with many small devices?