Haproxy

From belajarwiki
Revision as of 14:34, 21 November 2020 by Aditya (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

https://www.haproxy.org/

Cara install haproxy di ubuntu 20.04.01 untuk load balancing

  apt get update
  apt get install haproxy
  cp /etc/haproxy/haproxy.cfg /etc/haproxy/haproxy_asli.cfg

Buka konfigurasi haproxy

  vi /etc/haproxy/haproxy.cfg

Tambahkan pada baris akhir

  frontend http_front
     bind *:80
     stats uri /haproxy?stats
     default_backend http_back
  backend http_back
     balance roundrobin   #pilih jenis algoritma
     #pilih server yang akan dibuat load balancing
     server wbs1.com 192.168.8.104:80 check   
     server wbs2.com 192.168.8.105:80 check

Restart service haproxy

  systemctl restart haproxy


NOTE : port 80 harus kosong