본문 바로가기
반응형

IT Knowledge/HAProxy10

HAProxy nbproc 설정 적용 HAProxy 설정 튜닝 Number of processes HAProxy는 별도의 설정을 하지 않으면 1개의 Process로 실행됩니다. (Default 1 Process) 만약 HAProxy가 기동되고 있는 서버가 mutiple Core 서버라고 한다면, 높은 부하가 주어질때, 1개의 Core만 열심히 사용중일 것입니다. 따라서, HAProxy 서버의 여러 Core를 적절히 사용하도록 하려면, 실행되는 Process의 수를 늘려주어야 합니다. 만약 HAProxy 서버가 4Core 시스템에서 동작중이라면, 아래와 같이 설정하여 Process의 수를 늘려주는 것이 좋습니다. global nbproc 4 cpu-map 1 1 cpu-map 2 2 cpu-map 3 3 cpu-map 4 4 (...) 일반적.. 2023. 8. 23.
HAProxy with SSL Termination / SSL Pass-Through [HAProxy with SSL Termination] /etc/haproxy/haproxy.cfg 예시 ... frontend localhost # http, https connection 모두 허용 bind *:80 bind *:443 ssl crt /etc/haproxy/ssl/cert.pem # SSL Termination 수행 redirect scheme https if !{ ssl_fc } # http 요청시 https로 redirect 하기 위한 설정 mode http default_backend nodes backend nodes # backend server에 http request 전달 mode http balance roundrobin option forwardfor server we.. 2023. 8. 10.
Testing Your HAProxy Config For the impatient, here’s a simple command to test a configuration file: $ haproxy -f /path/to/haproxy.cfg -c The flag '-c', enables “check mode” and is the flag that tells HAProxy to test, without actually starting or restarting HAProxy Testing a Running Proxy’s Config Testing a throwaway config is one thing, but when you make a change to a running service’s configuration file, how should you t.. 2023. 8. 10.
Customize HAProxy Log format(Mode TCP / HTTP) Customizing the HAProxy Logs There are plenty of reasons why you might want to customize the fields captured by the HAProxy logs. For example: the default log format is giving you more information that you need you’re missing an important piece of information with the default log format you need to structure the fields in a way that an external tool can read them you rely on a standard log forma.. 2023. 8. 10.
HAProxy Log 설정하기! HAProxy는 단순히 파일에 대한 로깅을 지원하지 않습니다. 문서 - https://cbonte.github.io/haproxy-dconv/2.5/configuration.html#8 https://www.haproxy.com/blog/introduction-to-haproxy-logging/ HAProxy는 syslog서버에서 처리하기 위한 로그메시지를 내보낼 수 있으며, Rsyslog 및 journald와 호환이 됩니다. 그리고, Logstash 및 Fluentd와 같은 로그전달자를 활용해서 중앙 로그 수집기로 로그를 보낼 수 있습니다. 로그를 로컬에 쌓고 싶은 경우, 로컬에 rsyslog를 설치하여, haproxy가 보내는 syslog를 수집 및 처리하도록 구성할 수 있습니다. [Rsyslog 설.. 2022. 5. 17.
keepalived 설정 파일 옵션 정리 [keepalived.conf.sample] ! Configuration File for keepalived global_defs { notification_email { acassen } notification_email_from Alexandre.Cassen@firewall.loc smtp_server 192.168.200.1 smtp_connect_timeout 30 router_id LVS_DEVEL } vrrp_instance VI_1 { state MASTER interface eth0 virtual_router_id 50 nopreempt priority 100 advert_int 1 authentication { auth_type PASS auth_pass 1111 } virtual_ipa.. 2022. 1. 29.
반응형