This document setup HAProxy as load balancer.
In frontend (codimd-http) we setup as SSL offloader and redirect http protocol to https. Then pass traffics to CodiMD backend.
In backend (codimd-servers) we setup health checker for CodiMD service. it check http://127.0.0.1:3000/status
and expect to get status 200 if service is working perfectly.
Below is a part of configuration example in /etc/haproxy/haproxy.cfg