Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

1.6. LVS — 블록 다이어그램

LVS routers use a collection of programs to monitor cluster members and cluster services. 그림 1.5. “LVS Components” illustrates how these various programs on both the active and backup LVS routers work together to manage the cluster.
LVS Components

그림 1.5. LVS Components

pulse 데몬은 활성 및 비활성 LVS 라우터에서 실행됩니다. 백업 라우터에서 pulse는 활성 라우터의 공개 인터페이스로 heartbeat를 보내어 활성 LVS 라우터가 올바르게 작동하는 지를 확인합니다. 활성 라우터에서 pulselvs 데몬을 시작하고 백업 LVS 라우터에서의 하트비트 (heartbeat) 쿼리에 응답합니다.
일단 lvs 데몬이 시작되면 이는 ipvsadm 유틸리티를 호출하여 커널에 있는 IPVS (IP Virtual Server) 라우팅 테이블을 설정 및 관리하고 각각의 실제 서버에 있는 설정된 가상 서버에 필요한 nanny 프로세스를 시작합니다. 각각의 nanny 프로세스는 하나의 실제 서버에서 설정된 서비스의 상태를 확인하고 실제 서버에 있는 서비스가 잘 작동하지 않을 경우 lvs 데몬에 보고합니다. 작동 불량 사항이 발견되면, lvs 데몬은 ipvsadm에 지시하여 IPVS 라우팅 테이블에서 실제 서버를 삭제합니다.
백업 LVS 라우터가 활성 LVS 라우터에서 응답을 받지 못하면, 모든 가상 IP 주소를 백업 LVS 라우터의 NIC 하드웨어 주소 (MAC 주소)로 다시 지정하기 위해 send_arp를 호출하여 장애조치를 시작하고, 활성 LVS 라우터에 있는 lvs 데몬을 종료하기 위해 공개 및 개인 네트워크 인터페이스를 통해 활성 LVS 라우터에 명령을 보낸 후, 설정된 가상 서버의 요청을 수락하기 위해 백업 LVS 라우터에 있는 lvs 데몬을 시작합니다.

1.6.1. LVS Components

1.6.1.1절. “pulse shows a detailed list of each software component in an LVS router.

1.6.1.1. pulse

This is the controlling process which starts all other daemons related to LVS routers. At boot time, the daemon is started by the /etc/rc.d/init.d/pulse script. It then reads the configuration file /etc/sysconfig/ha/lvs.cf. On the active router, pulse starts the LVS daemon. On the backup router, pulse determines the health of the active router by executing a simple heartbeat at a user-configurable interval. If the active router fails to respond after a user-configurable interval, it initiates failover. During failover, pulse on the backup router instructs the pulse daemon on the active router to shut down all LVS services, starts the send_arp program to reassign the floating IP addresses to the backup router's MAC address, and starts the lvs daemon.

1.6.1.2. lvs

lvs 데몬이 일단 pulse에 의해 호출되면 활성화된 LVS 라우터에서 실행됩니다. 이는 /etc/sysconfig/ha/lvs.cf 설정 파일을 읽으며, ipvsadm 유틸리티를 호출하여 IPVS 라우팅 테이블을 생성하고 관리하며 각각의 설정된 LVS 서비스 용 nanny 프로세스를 지정합니다. nanny가 실제 서버가 다운되었다고 보고하면 lvsipvsadm 유틸리티를 지시하여 IPVS 라우팅 테이블에서 실제 서버를 삭제합니다.

1.6.1.3. ipvsadm

이 서비스로 커널에서 IPVS 라우팅 테이블을 업데이트합니다. lvs 데몬은 IPVS 라운팅 테이블에 있는 항목을 추가, 변경, 삭제하기 위해 ipvsadm 명령을 호출하여 LVS를 설정 및 관리합니다.

1.6.1.4. nanny

nanny 모니터링 데몬은 활성 LVS 라우트에서 실행됩니다. 이 데몬을 통해, 활성화된 라우터는 실제 서버 상태를 확인하며, 옵션으로 작업량을 모니터합니다. 분리된 프로세스는 실제 서버에 정의된 각각의 서비스에 대해 실행됩니다.

1.6.1.5. /etc/sysconfig/ha/lvs.cf

이는 LVS 설정 파일입니다. 직접 또는 간접적으로 모든 데몬은 이 파일에서 설정 정보를 얻게 됩니다.

1.6.1.6. Piranha Configuration Tool

LVS 모니터링, 설정, 관리 용 웹 기반 도구로 /etc/sysconfig/ha/lvs.cf LVS 설정 파일을 관리하기 위한 기본값 도구입니다.

1.6.1.7. send_arp

이 프로그램은 장애조치 중 하나의 노드에서 다른 노드로 유동 IP 주소가 변경되었을때 ARP 브로드캐스트를 전송합니다.
2장. LVS 초기 설정 reviews important post-installation configuration steps you should take before configuring Red Hat Enterprise Linux to be an LVS router.