Jitsi load balancing with Nginx

Something strange happen:

Have five websites all published by Nginx on port 82, four of them give with the check l7OK/200

The jitsi website give L4OK although the check is on port 82 HTTP and unable to open through Haproxy.

The certificates are tested and working fine with the four websites, the jitsi website give The page isn’t redirecting properly.

Direct access from the server display the camera and with Nginx with the Nginx port 443 enabled a good working website

Help would be appreciated as I can’t find the solution, after many hours with different scenarios to, solve it

The front and backend from Haproxy are here:

frontend web
mode http
option httplog
bind xx.xxx.xx.11:80
bind xx.xxx.xx.11:443 ssl crt /etc/haproxy/ssl/cert.pem alpn h2,http/1.1
http-request redirect scheme https code 301 if !{ ssl_fc }
log-format “client\ =\ %ci:%cp,\ server\ =\ %si:%sp%HU\ (%s),\ backend\ =\ %bi:%bp\ (%b),\ status\ =\ %ST”
timeout client 60000
option logasap
log global
maxconn 20000

backend jitsi
mode http
balance uri
hash-type consistent
timeout connect 5s
timeout server 60s
option http-keep-alive
option forwardfor
server conf1-meet xx.xxx.xx.13:82 check
server conf2-meet xx.xxx.xx.14:82 check

I am not sure about your specific issue, but be aware that if you are using haproxy in front of Jitsi you need to use stick tables to make sure that a conference consistently routes all users to the same prosody/jicofo.

FWIW this is the haproxy configuration template used for meet.jit.si. It’s ansible wrapped around a consul-template template so is a little hard to immediately grok but it might give you a sense of how to set up your stick table and what to do with your frontends and backends: infra-configuration/ansible/roles/hcv-haproxy-configure/templates/haproxy.cfg.template.j2 at main · jitsi/infra-configuration · GitHub

1 Like