This was tested to work using HAProxy 2.8 on Ubuntu 20.04.
This lets you run a cluster of API servers configured to use HTTP/2 (for example, Fastify using { http2: true }
), behind a HAProxy LB, so that you can serve typical REST API requests as well as SSE (Server Side Events) streaming connections, so that you can do fancy real-time page updates in your app.
Using HTTP/2 resolves the "6 concurrent HTTP connections" limit imposed by Chrome/Firefox/etc, which means the web app would become unresponsive if the user has 6+ tabs open with the app simultaneously.