HAProxy Configuration

Nice there is a PR for this :slightly_smiling_face:

I had just worked out a way to make this work with haproxy. I have each nginx instance set a SERVERID cookie, and use this haproxy backend

backend stick
  balance leastconn
  stick-table type string len 256 size 200k expire 120m peers haproxy

  # stick room name to server on initial connection
  # we will also store the SERVERID response cookie from this request (see below)
  stick on path,word(1,/) if { url_param(jwt) -m found }

  # stick/match room name to server on connection to xmpp endpoints
  # this refreshes the table entry during a conference as the endpoint is polled periodically
  stick on url_param(room) if { path_beg /xmpp-websocket } || { path_beg /http-bind }

  # match request cookie SERVERID on other requests, most importantly for the jvb websocket endpoint
  # we have to connect to the same server as our xmpp connection
  stick match req.cook(SERVERID)

  # store response cookie SERVERID
  # this sticks the user to this server until they join another room
  stick store-response res.cook(SERVERID)

  hash-type consistent
  timeout connect 5s
  timeout check 5s
  timeout client 30s
  timeout server 65s
  server shard1 x.x.x.x:443 maxconn 8192 check ssl verify none
  server shard2 x.x.x.x:443 maxconn 8192 check ssl verify none

Hi cwareen, the SERVERID cookie is also a good solution.
By the way my PR can’t be approved now because it will break websocket connection at the videobridge side.
Regards