더북(TheBook)

소프트웨어 로드밸런싱 도구 HAProxy

로드밸런싱을 하는 가장 대표적인 소프트웨어가 바로 HAProxy입니다. HAProxy는 기존의 하드웨어 스위치를 대체하는 오픈 소스 소프트웨어로 네트워크 스위치에서 제공하는 L4, L7 기능과 로드밸런서 기능이 있습니다. 이 절에서는 앞에서 구성한 MariaDB 클러스터링에 HAProxy를 추가로 구성해 보겠습니다.

1. 먼저 ubuntu01 노드에 apt-get install 명령어를 이용해 HAProxy를 설치합니다.

root@ubuntu01:~# apt-get install haproxy
Reading package lists… Done
Building dependency tree
Reading state information… Done The following additional packages will be installed: liblua5.3-0 Suggested packages: vim-haproxy haproxy-doc The following NEW packages will be installed: haproxy liblua5.3-0 0 upgraded, 2 newly installed, 0 to remove and 126 not upgraded. Need to get 872 kB of archives. After this operation, 1,997 kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 liblua5.3-0 amd64 5.3.1-1ubuntu2 [116 kB] Get:2 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 haproxy amd64 1.6.3-1ubuntu0.1 [756 kB] Fetched 872 kB in 7s (124 kB/s) Selecting previously unselected package liblua5.3-0:amd64. (Reading database … 60266 files and directories currently installed.) Preparing to unpack …/liblua5.3-0_5.3.1-1ubuntu2_amd64.deb … Unpacking liblua5.3-0:amd64 (5.3.1-1ubuntu2) … …

신간 소식 구독하기
뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.