[질문] 레드햇 로드 밸런싱 - Piranha 설정에 관하여

myjuliet의 이미지

안녕하십니까..

서버 로드밴런싱에 대해 공부하다가 LVS / Piranha 에 까지 오게되었습니다.

환경이 그리 넉넉치가 않아 3개의 pc에 vmware를 설치하여 브릿지로 잡고 테스트 진행중입니다.

한가지 질문 사항이 있어 여쭤보려고 합니다.

[root@localhost /usr/local/apache/logs]# cat /etc/sysconfig/ha/lvs.cf
serial_no = 60
primary = 192.168.100.70
service = lvs
backup_active = 0
backup = 0.0.0.0
heartbeat = 1
heartbeat_port = 539
keepalive = 6
deadtime = 18
network = nat
nat_router = 192.168.100.70 <--- 이 부분이 이해가 가지 않습니다.
nat_nmask = 255.255.255.255
debug_level = NONE
virtual [server_name] {
active = 1
address = 192.168.100.76 eth0:1
vip_nmask = 255.255.255.255
port = 80
send = "GET / HTTP/1.0\r\n\r\n"
expect = "HTTP"
use_regex = 0
load_monitor = none
scheduler = wlc
protocol = tcp
timeout = 5
reentry = 10
quiesce_server = 0
server [unnamed] {
address = 192.168.100.71
active = 1
weight = 100
}
server [unnamed] {
address = 192.168.100.61
active = 1
weight = 100
}
server [unnamed] {
address = 192.168.100.11
active = 1
weight = 100
}
}

--------------------------------------------------------------------------------

[root@localhost /usr/local/apache/logs]# iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DNAT tcp -- anywhere 192.168.100.70 tcp dpt:http to:192.168.100.76:80

Chain POSTROUTING (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

---------------------------------------------------------------------------------
[root@localhost /etc/sysconfig/ha]# cat /proc/sys/net/ipv4/ip_forward
1

위 사항은 제가 셋팅한 내역입니다.

현재 어떤식으로 구성되어 있는지 간략히 말씀드리겠습니다.

primary = 192.168.100.70 이 부분이 제가 실제 ssh를 사용하여 접속하는 ip 입니다.
address = 192.168.100.76 eth0:1 이 부분은 위(100.70) ip를 virtual로 설정하였습니다.
나머지 real server부분은 다른 pc 사설 ip 입니다. (각각 다른 컴퓨터 입니다.)

192.168.100.70 혹은 76으로 웹브라우져에서 열어보면 페이지는 잘 열리는데요

피라니아를 올리고(piranha_gui)나서 70혹은 76페이지를 열리면 응답이 없습니다.

서버 포트는 살아있습니다. 설정 문제 같은데요

nat_router = 192.168.100.70 <--- 이 부분이 이해가 가지 않습니다.
nat_nmask = 255.255.255.255

저 nat_router 부분이 이해가 가지 않습니다. 보통 피라니아 설정의 경우

primary = 저부분에 공인 아이피를 할당하고 Primary server private IP 부분엔

사설을 줘야 하는걸로 알고 있습니다. 그리고 나서 NAT Router netmask 부분에 Primary server private IP 와

같은 사설 ip를 줘야하는걸로 알고 있는데요;; ㅈㅔ가 알고 있는 개념부분에 몬가 잘못된 것이 있는지요;;

피라니아 올린 후 물론 pulse 도 스타트 시켰습니다.. 조언좀 부탁드립니다. 4일째 붙잡고 있는데

힘드네요;;

myjuliet의 이미지

Jun 28 12:52:54 localhost lvs[3479]: starting virtual service [server_name] active: 80
Jun 28 12:52:54 localhost kernel: IPVS: [lc] scheduler registered.
Jun 28 12:52:54 localhost lvs[3479]: create_monitor for [server_name]/[unnamed] running as pid 3491
Jun 28 12:52:54 localhost lvs[3479]: create_monitor for [server_name]/[unnamed] running as pid 3492
Jun 28 12:52:54 localhost lvs[3479]: create_monitor for [server_name]/[unnamed] running as pid 3493
Jun 28 12:52:54 localhost nanny[3491]: starting LVS client monitor for 192.168.100.76:80
Jun 28 12:52:54 localhost nanny[3491]: making 192.168.100.71:80 available
Jun 28 12:52:54 localhost nanny[3492]: starting LVS client monitor for 192.168.100.76:80
Jun 28 12:52:54 localhost nanny[3493]: starting LVS client monitor for 192.168.100.76:80
Jun 28 12:52:54 localhost nanny[3493]: making 192.168.100.11:80 available
Jun 28 12:52:54 localhost nanny[3492]: making 192.168.100.61:80 available
Jun 28 12:52:59 localhost pulse[3481]: gratuitous lvs arps finished

명후니~

myjuliet의 이미지

http://blog.naver.com/ap570?Redirect=Log&logNo=120002352852

위 URL처럼 다른 방식으로햇는데요 한가지 결정적인 부분은

ipconfig eht0:1 up 으로 강제로 가상으로 올려줫는데 그럼 안되는 거였군요...

또한 아파치 conf에서도 virtual 부분을 수정해줘야 하네요.. iptables 부분도 변경하였습니다.

허나;;; Private 주소를 입력하면 real로 설정한 ip가 뜨질 않습니다.

명후니~

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.