/
tomcat clustering을 위한 IP Multicast 정상 설정 여부 테스트 하기

tomcat clustering을 위한 IP Multicast 정상 설정 여부 테스트 하기


개요

tomcat 등의 WAS 는 session clustering 을 하기 위해 세션 정보를 ip multicast 를 이용하여 노드들에게 전송한다.

multicast  정상 설정 여부를 Java caching server 인 coherence 를 사용해서 확인하는 절차를 정리

iPerf 로 확인

설치

iperf3 는 MultiCast 를 지원하지 않으므로 2 설치

sudo wget -O /usr/bin/iperf https://iperf.fr/download/ubuntu/iperf_2.0.9
sudo chmod +x /usr/bin/iperf


확인

서버

iperf -s -u -B 228.0.0.4 -i 1 -p 45564


client

iperf -c 228.0.0.4 -u -T 32 -t 3 -i 1 -p 45564


Coherence 사용

설치

  1. Coherence 사이트에 연결한다.
  2. 현재 버전이 12.x 대인데 이거 받지 말고 하단의 Previous Releases... 눌러서 예전 버전(3.7.x, 3.6x) 를 다운받는다.
  3. 다운받은 버전을 multicast 를 테스트할 서버에 업로드한다.
  4. unzip 을 압축을 푼다.

    unzip coherence-java-3.7.1.0b27797.zip
  5. cd coherence
  6. chmod +x bin/*.sh


Multicast test

참고 사이트: http://wiki.tangosol.com/display/COH33UG/Multicast+Test

bin/multicast-test.sh로 테스트를 수행한다. 다음과 같은 옵션이 있다.

command options:
-local (optional) the address of the NIC to transmit on, specified as an ip address, default localhost
-group (optional) the multicast address to use, specified as ip:port, default 237.0.0.1:9000
-ttl (optional) the time to live for multicast packets, default 4
-delay (optional) the delay in seconds between sending packets, default 2
-packetSize (optional) the size of packet to send, default based on local MTU
-display (optional) the number of bytes to display from unexpected packets, default 0
-translate (optional) listen to cluster multicast traffic and translate packets

tomcat 의 기본 멀티캐스트 주소로 테스트 하는 예제. 아래와 같이 mutlcast 응답하는 IP 를 확인할 수 있다

$ bin/multicast-test.sh -group 228.0.0.4:45564 -ttl 4 -delay 2
Starting test on ip=myhost/10.10.10.101, group=/228.0.0.4:45564, ttl=4
Configuring multicast socket...
Starting listener...
Wed Dec 18 14:13:22 KST 2013: Sent packet 1 containing 1468 bytes.
Wed Dec 18 14:13:22 KST 2013: Received test packet 1 from self (sent 6ms ago).
Wed Dec 18 14:13:23 KST 2013: Received 77 bytes from an unknown multicast application at 10.10.10.87: ???


같이 보기

Ref


Related content

tomcat 세션 클러스터링 설정
tomcat 세션 클러스터링 설정
More like this
Proxy(프락시) 환경에서 client IP 를 얻기 위한 X-Forwarded-For(XFF) http header
Proxy(프락시) 환경에서 client IP 를 얻기 위한 X-Forwarded-For(XFF) http header
More like this
ifconfig, route 를 대체하는 Linux ip 명령어
ifconfig, route 를 대체하는 Linux ip 명령어
More like this
아파치 톰캣(apache tomcat) 보안 강화하기
아파치 톰캣(apache tomcat) 보안 강화하기
More like this
ubuntu netplan 으로 고정 ip 설정하기(static ip config)
ubuntu netplan 으로 고정 ip 설정하기(static ip config)
More like this
NetBSD
More like this