SlideShare a Scribd company logo
1 of 21
<Insert Picture Here>

2. Assignment / Homework made by OTD Teacher
(사전 백그라운드)
for Oracle ACS & Partner
이범 beom.lee@oracle.com
Oracle Fusion Middleware
Agenda
• Load Balancer Topology

• OTD vs HAProxy vs NetScaler …
• Linux Virtual Server
• Solaris Crossbow

Copyright © Oracle Corporation, 2014. All rights reserved.
Load Balancer Topology
•
•
•

Inline
One-Arm
DSR(Direct Server Return)

Copyright © Oracle Corporation, 2014. All rights reserved.
Inline – Bridge(Transparent) Mode
• 같은 네트워크 대역 내에서의 Inline 구성 – Half NAT
• LB 입장에서의 Request / Response
•
•

Request : LB가 Real Server으로 Balancing할 때 Destination IP를 Real Server IP / Mac으로 변조하여 송신
Response : LB가 Real Server로부터 응답을 받아서 Source IP만 LB의 VIP로 변조하여 응답

x.x.1.1 (C)

Client
(User)

x.x.1.1 (C)
S-IP

D-MAC

C

C

S-IP

LB – VIP
x.x.10.10 (L)

D-MAC

S

L

x.x.1.1

S-MAC

x.x.10.1 (R)

D-IP

x.x.10.10

x.x.10.10

S-MAC

LB – VIP
x.x.10.10 (L)

S-IP

D-IP

x.x.1.1
x.x.10.1 (R)

Client
(User)

D-IP

x.x.10.15

x.x.1.1

D-MAC

S-MAC

D-MAC

C

Copyright © Oracle Corporation, 2014. All rights reserved.

x.x.10.15

S-MAC

Real
Real
Server
Server

D-IP

x.x.1.1

x.x.10.15 (S)

S-IP

S

S

C

x.x.10.15 (S)

Real
Real
Server
Server
Inline – Router Mode
• 다른 네트워크 대역 내에서의 Inline 구성 – Half NAT
• LB 입장에서의 Request / Response
•
•

Request : LB가 Real Server으로 Balancing할 때 Destination IP/Mac를 Real Server IP / Mac으로 변조하고
네트워크 대역이 다르기 때문에 Source Mac도 변조하여 송신
Response : LB가 Real Server로부터 응답을 받아서 Source IP만 LB의 VIP로 변조하여 응답

x.x.1.1 (C)

Client
(User)

x.x.1.1 (C)
S-IP

D-MAC

C

LB – VIP x.x.10.1
x.x.10.10 (L1)
x.x.20.10 (L2)
x.x.20.1

D-MAC

L1

L1

x.x.1.1

S-MAC

x.x.10.1 (R)

D-IP

x.x.10.10

x.x.10.10

S-MAC

LB – VIP x.x.10.1
x.x.10.10 (L1)
x.x.20.10 (L2)
x.x.20.1

S-IP

D-IP

x.x.1.1
x.x.10.1 (R)

Client
(User)

C

S-IP

D-IP

x.x.20.15

x.x.20.15

x.x.1.1

S-MAC

D-MAC

S-MAC

D-MAC

L2
Real
Real
Server
Server

D-IP

x.x.1.1

x.x.20.15 (S)

S-IP

S

S

L2

네트워크 대역이 다르기
때문에 Source Mac도 변조

Copyright © Oracle Corporation, 2014. All rights reserved.

x.x.20.15 (S)

Real
Real
Server
Server
One-Arm Mode – Full NAT
• 네트워크 구성 변경이 없어 Inline 모드보다는 구성 용이
• LB 입장에서의 Request / Response
•
•

Request : LB가 Real Server으로 Balancing할 때 Destination IP를 Real Server의 IP / Mac으로 변조하여 송신
Response : LB가 Real Server로부터 응답을 받아서 Source IP만 LB의 VIP로 변조하여 응답

x.x.1.1 (C)

Client
(User)

x.x.1.1 (C)

Client
(User)

S-IP

S-IP

D-IP

x.x.1.1

x.x.10.10

x.x.10.10

x.x.1.1

S-MAC

D-MAC

S-MAC

D-MAC

C

x.x.10.1 (R)

D-IP

L1

L1

C

LB – VIP
x.x.10.10 (L1)
x.x.20.20 (L2)
….

x.x.10.1 (R)

LB – VIP
x.x.10.10 (L1)
x.x.20.20 (L2)
….
S-IP

S-IP

D-IP

x.x.20.20

x.x.20.35

x.x.20.35

x.x.20.20

S-MAC

x.x.20.35 (S)

D-IP

D-MAC

S-MAC

D-MAC

L2

S

S

L2

Real
Real
Server
Server

Copyright © Oracle Corporation, 2014. All rights reserved.

x.x.20.35 (S)

Real
Real
Server
Server
L2 DSR(Direct Server Return) Mode
• DSR 모드는 송신 패킷에 비해 응답 패킷이 큰 Streaming, Multi-Media 및 Voice Over IP에서 주로
사용되는 모드로 LB를 통하지 않고 Client로 바로 응답하는 메커니즘을 사용
• LB와 Real Server가 동일 네트워크 대역 내에 있어야 함 (소규모용)
• LB 입장에서의 Request / Response
•
•

•

Request : LB가 Real Server으로 Balancing할 때 Destination IP를 Real Server의 Mac으로 변조하여 송신
Response : Real Server가 LB를 통하지 않고 Source IP를 LB의 VIP로 변조하여 응답

LB – VIP (L)
x.x.10.10

Real Server에 LB의 VIP로
Loopback Alias 만드는 이유
•
•

ARP로 Mac 주소 Broadcasting 방지
Real Server에서 LB의 VIP로 패킷을
내보내기 위한 Interface

S-IP

D-IP

S-IP

D-IP

x.x.1.1

x.x.10.10

x.x.1.1

x.x.10.10

S-MAC

D-MAC

S-MAC

D-MAC

R

L

L

S

x.x.1.1 (C)
Client
(User)

x.x.10.1 (R)

x.x.10.15 (S)

S-MAC

S-IP

D-IP

S1

Copyright © Oracle Corporation, 2014. All rights reserved.

D-MAC
R

x.x.10.10

x.x.1.1

Configure
Loopback Alias
x.x.10.10

Real
Real
Server
Server
Listen IP
x.x.10.10
L3 DSR(Direct Server Return) Mode
• LB와 Real Server가 동일 네트워크 대역 내에 있지 않기 때문에 확장 용이 (대규모용)
• LB 입장에서의 Request / Response
•
•

•

Request : LB가 Real Server으로 Balancing할 때 Destination IP를 Real Server IP / Mac으로 변조하여 송신
Response : Real Server가 LB를 통하지 않고 Source IP를 LB의 VIP로 변조하여 응답

Real Server에 LB의 VIP로
Loopback Alias 만드는 이유
•
•

LB – VIP (L)
x.x.10.10
Configure DSCP

ARP로 Mac 주소 Broadcasting 방지
Real Server에서 LB의 VIP로 패킷을
내보내기 위한 Interface

S-IP

D-IP

S-IP

D-IP

x.x.1.1

x.x.10.10

x.x.1.1

x.x.20.15

S-MAC

D-MAC

S-MAC

D-MAC

R

L

L

S1

Real Server iptables
rewrite rule : x.x.10.10

x.x.1.1 (C)
Client
(User)

x.x.10.1 (R)

x.x.20.15 (S1)

S-MAC

D-MAC

S-IP

D-IP

S1

R

x.x.10.10

x.x.1.1

DSCP(Differentiated Services Code Point) 이용 방식
Copyright © Oracle Corporation, 2014. All rights reserved.

Configure
Loopback Alias
x.x.10.10

Real
Real
Server
Server
Listen IP
x.x.10.10

x.x.30.15 (S2)

Real
Real
Server
Server

L3 DSR
Kernel
Module
구성 필요
참고 DSR – Mac Address Issues
•

DSR에서 LB의 VIP IP 주소를 Real Server에서 Loopback alias로 아래와 같이 설정
•
ifconfig lb_vip_vnic
up
•
ifconfig lb_vip_vnic :0 inet <LB VIP> netmask 255.255.255.255 up

•

Real Server에서 LB의 VIP IP 주소를 Loopback alias로 구성했지만 ARP Broadcasting이 발생하여
IP가 중복 이슈가 있을 수도 있어서 아래와 같이 ARP Broadcasting을 막도록 설정
•
echo 1 > /proc/sys/net/ipv4/conf/lb_vip_vnic/arp_ignore
•
echo 2 > /proc/sys/net/ipv4/conf/lb_vip_vnic/arp_announce

•

참고 사항 : 위의 방법대로 설정했음에도 불구하고 ARP 이슈가 해결되지 않을 때는 아래의 URL 참조
•
RedHat 5와 RedHat 6의 설정값 의미가 변동
•
https://www.centos.org/forums/viewtopic.php?t=8401 에서 발췌
•

Both RHEL6 and RHEL5 ship with a default /etc/sysctl.conf that sets this sysctl to 1, but the meaning of this value
is different between the RHEL6 and the RHEL5 kernel.

•

The problem is in a modification of rp_filter in RHEL 6. rp_filter = 1 worked fine in RHEL 5 and earlier versions.
With RHEL 6 rp_filter needs to be set to 0 or 2

Copyright © Oracle Corporation, 2014. All rights reserved.
L3 DSR(Direct Server Return) Mode
•
•
•

IP in IP라는 IP Tunneling 프로토콜 이용 방식
받은 IP Packet을 한번 더 IP 헤더를 붙여서 전달하는 방식
Outer IP 헤더에 Destination IP를 Real Server IP로
설정하여 실제 Real Server로 전달될 수 있게 함
•
•

•
•
•

Outer
IP Header

Inner
IP Header

IP Payload

LB는 Inner IP 헤더의 TOS 값을 Outer IP 헤더에 복사
이를 위해서는 Real Server에 IP in IP를 처리할 수
있는 Kernel Module을 구성 필요

DSCP(Differentiated Services Code Point) 이용 방식
IP in IP을 이용하는 방식과의 주요
차이는 Outer IP 헤더가 없는 것임
추가적인 Outer IP 헤더가 붙지
않기 때문에 특별히 Fragmentation에
대한 대비를 할 필요가 없음

참고 사항 : DiffServ uses the 6-bit Differentiated services Field
(DS field) in the IP header for packet classification purposes.
The DS field and ECN field replace the outdated IPv4 TOS field.
(RFC 3260 : http://tools.ietf.org/html/rfc3260 )
Copyright © Oracle Corporation, 2014. All rights reserved.

참고
•
•
•
•
•
•
•

URL
http://en.wikipedia.org/wiki/IP_in_IP
http://en.wikipedia.org/wiki/Type_of_service
https://github.com/yahoo/l3dsr
http://bogpeople.com/networking/dscp.shtml
http://www.nanog.org/meetings/nanog51/presentations/Monday/NANOG51.
Talk45.nanog51-Schaumann.pdf
http://www.tucny.com/Home/dscp-tos
http://tools.ietf.org/html/rfc2474 & http://tools.ietf.org/html/rfc2475
참고 : Citrix NetScaler DSR Mode
•
•

Brocade(Foundry), Alteon, F5 등등의 Load Balancer 장비들은 DSR 모두를 제공하고 있으며
요즘 대부분의 Load Balancer 장비들은 TOS(DSCP)와 IP in IP(IP over IP) 방식 모두 제공하고 있음.
예로 NetScaler를 살펴봐도 모두 제공함.
•
•
•

http://support.citrix.com/proddocs/topic/netscaler-load-balancing-93/ns-lb-usecases-dsrmode-con.html
http://support.citrix.com/proddocs/topic/netscaler-load-balancing-93/ns-lb-usecases-dsrmode-tos-tsk.html
http://support.citrix.com/proddocs/topic/netscaler-load-balancing-93/ns-lb-usecases-dsrmode-tos-ipoverip-con.html

Copyright © Oracle Corporation, 2014. All rights reserved.
Physical Load Balancer Topology

NAT-based, route-path, one-armed SLB
NAT-based, route-path, two-armed SLB
http://oreilly.com/catalog/serverload/chapter/ch07.html
Copyright © Oracle Corporation, 2014. All rights reserved.
Physical Load Balancer Topology

NAT-based network topology with DSR

redundancy scenario
http://oreilly.com/catalog/serverload/chapter/ch07.html
Copyright © Oracle Corporation, 2014. All rights reserved.
OTD vs HAProxy vs NetScaler

Copyright © Oracle Corporation, 2014. All rights reserved.
OTD vs HAProxy vs NetScaler

Copyright © Oracle Corporation, 2014. All rights reserved.
Linux Virtual Server

Copyright © Oracle Corporation, 2014. All rights reserved.
Linux Virtual Server
https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Virtual_Server_Administration/index.html

Basic LVS Configuration
LVS Implemented with NAT Routing

LVS Implemented with Direct
Routing (same as DSR)

Copyright © Oracle Corporation, 2014. All rights reserved.

Three-Tier LVS Configuration

LVS Components
Solaris Crossbow

Copyright © Oracle Corporation, 2014. All rights reserved.
Solaris Crossbow – Network Cloud

Copyright © Oracle Corporation, 2014. All rights reserved.
Solaris Crossbow – Network Cloud
• http://docs.oracle.com/cd/E26502_01/html/E28993/gmhbd.html#gmhiq
• Stateless DSR topology
• NAT mode (full-NAT and half-NAT) topology

NAT mode Topology
Copyright © Oracle Corporation, 2014. All rights reserved.

Stateless DSR Topology
Thanks to
DSR에 많은 정보와 도움을 주신 후배 이태근님에게
감사의 인사를 전하며…
Copyright © Oracle Corporation, 2014. All rights reserved.

More Related Content

What's hot

Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
SANG WON PARK
 

What's hot (20)

카프카, 산전수전 노하우
카프카, 산전수전 노하우카프카, 산전수전 노하우
카프카, 산전수전 노하우
 
Kafka slideshare
Kafka   slideshareKafka   slideshare
Kafka slideshare
 
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
 
F5 container ingress_service_in_kuernetes_with_calico_cni_by_duck_in_korea
F5 container ingress_service_in_kuernetes_with_calico_cni_by_duck_in_koreaF5 container ingress_service_in_kuernetes_with_calico_cni_by_duck_in_korea
F5 container ingress_service_in_kuernetes_with_calico_cni_by_duck_in_korea
 
resource on openstack
 resource on openstack resource on openstack
resource on openstack
 
네트워크 기본
네트워크 기본네트워크 기본
네트워크 기본
 
DPDK
DPDKDPDK
DPDK
 
[242]open stack neutron dataplane 구현
[242]open stack neutron   dataplane 구현[242]open stack neutron   dataplane 구현
[242]open stack neutron dataplane 구현
 
Kafka 자료 v0.1
Kafka 자료 v0.1Kafka 자료 v0.1
Kafka 자료 v0.1
 
[2B5]nBase-ARC Redis Cluster
[2B5]nBase-ARC Redis Cluster[2B5]nBase-ARC Redis Cluster
[2B5]nBase-ARC Redis Cluster
 
[OpenInfra Days Korea 2018] Day 2 - E6 - 마이크로서비스를 위한 Istio & Kubernetes [다운로드...
[OpenInfra Days Korea 2018] Day 2 - E6 - 마이크로서비스를 위한 Istio & Kubernetes [다운로드...[OpenInfra Days Korea 2018] Day 2 - E6 - 마이크로서비스를 위한 Istio & Kubernetes [다운로드...
[OpenInfra Days Korea 2018] Day 2 - E6 - 마이크로서비스를 위한 Istio & Kubernetes [다운로드...
 
Apache kafka performance(latency)_benchmark_v0.3
Apache kafka performance(latency)_benchmark_v0.3Apache kafka performance(latency)_benchmark_v0.3
Apache kafka performance(latency)_benchmark_v0.3
 
Open vSwitch의 Vendor Extension 구현
Open vSwitch의 Vendor Extension 구현Open vSwitch의 Vendor Extension 구현
Open vSwitch의 Vendor Extension 구현
 
[오픈소스컨설팅] Open stack kilo with DVR_CEPH_v1.1
[오픈소스컨설팅] Open stack kilo with DVR_CEPH_v1.1[오픈소스컨설팅] Open stack kilo with DVR_CEPH_v1.1
[오픈소스컨설팅] Open stack kilo with DVR_CEPH_v1.1
 
2nd SDN Interest Group Seminar-Session3 (121218)
2nd SDN Interest Group Seminar-Session3 (121218)2nd SDN Interest Group Seminar-Session3 (121218)
2nd SDN Interest Group Seminar-Session3 (121218)
 
채팅서버의 부하 분산 사례
채팅서버의 부하 분산 사례채팅서버의 부하 분산 사례
채팅서버의 부하 분산 사례
 
김성윤 - 우분투로 슈퍼컴 만들기 (2011Y03M26D)
김성윤 - 우분투로 슈퍼컴 만들기 (2011Y03M26D)김성윤 - 우분투로 슈퍼컴 만들기 (2011Y03M26D)
김성윤 - 우분투로 슈퍼컴 만들기 (2011Y03M26D)
 
[234]멀티테넌트 하둡 클러스터 운영 경험기
[234]멀티테넌트 하둡 클러스터 운영 경험기[234]멀티테넌트 하둡 클러스터 운영 경험기
[234]멀티테넌트 하둡 클러스터 운영 경험기
 
Openstack live migration
Openstack live migrationOpenstack live migration
Openstack live migration
 
Open vSwitch 패킷 처리 구조
Open vSwitch 패킷 처리 구조Open vSwitch 패킷 처리 구조
Open vSwitch 패킷 처리 구조
 

Similar to Before OTD EDU Assignments

IPv6 이론과 소켓 프로그래밍
IPv6 이론과 소켓 프로그래밍IPv6 이론과 소켓 프로그래밍
IPv6 이론과 소켓 프로그래밍
OnGameServer
 

Similar to Before OTD EDU Assignments (20)

[OpenStack Days Korea 2016] Innovating OpenStack Network with SDN solution
[OpenStack Days Korea 2016] Innovating OpenStack Network with SDN solution[OpenStack Days Korea 2016] Innovating OpenStack Network with SDN solution
[OpenStack Days Korea 2016] Innovating OpenStack Network with SDN solution
 
Netmanias L2,L3 Training (3) L2, L3 QoS
Netmanias L2,L3 Training (3) L2, L3 QoSNetmanias L2,L3 Training (3) L2, L3 QoS
Netmanias L2,L3 Training (3) L2, L3 QoS
 
Red Hat OpenStack 17 저자직강+스터디그룹_2주차
Red Hat OpenStack 17 저자직강+스터디그룹_2주차Red Hat OpenStack 17 저자직강+스터디그룹_2주차
Red Hat OpenStack 17 저자직강+스터디그룹_2주차
 
Rhea_MMO_SNG_Convergence_Server_Architecture
Rhea_MMO_SNG_Convergence_Server_ArchitectureRhea_MMO_SNG_Convergence_Server_Architecture
Rhea_MMO_SNG_Convergence_Server_Architecture
 
Solaris 11 network virtualization & Server Virtualization for cloud
Solaris 11 network virtualization & Server Virtualization for cloudSolaris 11 network virtualization & Server Virtualization for cloud
Solaris 11 network virtualization & Server Virtualization for cloud
 
spark database Service
spark database Servicespark database Service
spark database Service
 
NDC14 모바일 게임서비스를 위한 사설 클라우드 구축/운영 분투기
NDC14 모바일 게임서비스를 위한 사설 클라우드 구축/운영 분투기NDC14 모바일 게임서비스를 위한 사설 클라우드 구축/운영 분투기
NDC14 모바일 게임서비스를 위한 사설 클라우드 구축/운영 분투기
 
cdit hci zerto '소통하는 세미나' 소개자료(201705)
cdit hci zerto '소통하는 세미나' 소개자료(201705)cdit hci zerto '소통하는 세미나' 소개자료(201705)
cdit hci zerto '소통하는 세미나' 소개자료(201705)
 
Red Hat OpenStack 17 저자직강+스터디그룹_3주차
Red Hat OpenStack 17 저자직강+스터디그룹_3주차Red Hat OpenStack 17 저자직강+스터디그룹_3주차
Red Hat OpenStack 17 저자직강+스터디그룹_3주차
 
[2011 CodeEngn Conference 05] ashine - 안드로이드 리눅스에서의 시스템 해킹
[2011 CodeEngn Conference 05] ashine - 안드로이드 리눅스에서의 시스템 해킹[2011 CodeEngn Conference 05] ashine - 안드로이드 리눅스에서의 시스템 해킹
[2011 CodeEngn Conference 05] ashine - 안드로이드 리눅스에서의 시스템 해킹
 
IPv6 이론과 소켓 프로그래밍
IPv6 이론과 소켓 프로그래밍IPv6 이론과 소켓 프로그래밍
IPv6 이론과 소켓 프로그래밍
 
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
 
11st Legacy Application의 Spring Cloud 기반 MicroServices로 전환 개발 사례
11st Legacy Application의 Spring Cloud 기반 MicroServices로 전환 개발 사례11st Legacy Application의 Spring Cloud 기반 MicroServices로 전환 개발 사례
11st Legacy Application의 Spring Cloud 기반 MicroServices로 전환 개발 사례
 
Cse342 chapter 04
Cse342 chapter 04Cse342 chapter 04
Cse342 chapter 04
 
LTM
LTMLTM
LTM
 
게임 서비스에 딱 맞는 AWS 신규 서비스들로 게임 아키텍처 개선하기 - 김병수 솔루션즈 아키텍트, AWS :: AWS Summit Seo...
게임 서비스에 딱 맞는 AWS 신규 서비스들로 게임 아키텍처 개선하기 - 김병수 솔루션즈 아키텍트, AWS :: AWS Summit Seo...게임 서비스에 딱 맞는 AWS 신규 서비스들로 게임 아키텍처 개선하기 - 김병수 솔루션즈 아키텍트, AWS :: AWS Summit Seo...
게임 서비스에 딱 맞는 AWS 신규 서비스들로 게임 아키텍처 개선하기 - 김병수 솔루션즈 아키텍트, AWS :: AWS Summit Seo...
 
[2018] 오픈스택 5년 운영의 경험
[2018] 오픈스택 5년 운영의 경험[2018] 오픈스택 5년 운영의 경험
[2018] 오픈스택 5년 운영의 경험
 
Network virtualization for the better understanding of Data Center Network
Network virtualization for the better understanding of Data Center NetworkNetwork virtualization for the better understanding of Data Center Network
Network virtualization for the better understanding of Data Center Network
 
20150525 open flow1.3_ryu_sdn_link aggregation 1_김지은
20150525 open flow1.3_ryu_sdn_link aggregation 1_김지은20150525 open flow1.3_ryu_sdn_link aggregation 1_김지은
20150525 open flow1.3_ryu_sdn_link aggregation 1_김지은
 
OpenStack Swift Debugging
OpenStack Swift DebuggingOpenStack Swift Debugging
OpenStack Swift Debugging
 

Recently uploaded

Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)
Wonjun Hwang
 
Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)
Wonjun Hwang
 

Recently uploaded (6)

Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
 
A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)
 
캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차
 
Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)
 
MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution DetectionMOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
 
Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)
 

Before OTD EDU Assignments

  • 1. <Insert Picture Here> 2. Assignment / Homework made by OTD Teacher (사전 백그라운드) for Oracle ACS & Partner 이범 beom.lee@oracle.com Oracle Fusion Middleware
  • 2. Agenda • Load Balancer Topology • OTD vs HAProxy vs NetScaler … • Linux Virtual Server • Solaris Crossbow Copyright © Oracle Corporation, 2014. All rights reserved.
  • 3. Load Balancer Topology • • • Inline One-Arm DSR(Direct Server Return) Copyright © Oracle Corporation, 2014. All rights reserved.
  • 4. Inline – Bridge(Transparent) Mode • 같은 네트워크 대역 내에서의 Inline 구성 – Half NAT • LB 입장에서의 Request / Response • • Request : LB가 Real Server으로 Balancing할 때 Destination IP를 Real Server IP / Mac으로 변조하여 송신 Response : LB가 Real Server로부터 응답을 받아서 Source IP만 LB의 VIP로 변조하여 응답 x.x.1.1 (C) Client (User) x.x.1.1 (C) S-IP D-MAC C C S-IP LB – VIP x.x.10.10 (L) D-MAC S L x.x.1.1 S-MAC x.x.10.1 (R) D-IP x.x.10.10 x.x.10.10 S-MAC LB – VIP x.x.10.10 (L) S-IP D-IP x.x.1.1 x.x.10.1 (R) Client (User) D-IP x.x.10.15 x.x.1.1 D-MAC S-MAC D-MAC C Copyright © Oracle Corporation, 2014. All rights reserved. x.x.10.15 S-MAC Real Real Server Server D-IP x.x.1.1 x.x.10.15 (S) S-IP S S C x.x.10.15 (S) Real Real Server Server
  • 5. Inline – Router Mode • 다른 네트워크 대역 내에서의 Inline 구성 – Half NAT • LB 입장에서의 Request / Response • • Request : LB가 Real Server으로 Balancing할 때 Destination IP/Mac를 Real Server IP / Mac으로 변조하고 네트워크 대역이 다르기 때문에 Source Mac도 변조하여 송신 Response : LB가 Real Server로부터 응답을 받아서 Source IP만 LB의 VIP로 변조하여 응답 x.x.1.1 (C) Client (User) x.x.1.1 (C) S-IP D-MAC C LB – VIP x.x.10.1 x.x.10.10 (L1) x.x.20.10 (L2) x.x.20.1 D-MAC L1 L1 x.x.1.1 S-MAC x.x.10.1 (R) D-IP x.x.10.10 x.x.10.10 S-MAC LB – VIP x.x.10.1 x.x.10.10 (L1) x.x.20.10 (L2) x.x.20.1 S-IP D-IP x.x.1.1 x.x.10.1 (R) Client (User) C S-IP D-IP x.x.20.15 x.x.20.15 x.x.1.1 S-MAC D-MAC S-MAC D-MAC L2 Real Real Server Server D-IP x.x.1.1 x.x.20.15 (S) S-IP S S L2 네트워크 대역이 다르기 때문에 Source Mac도 변조 Copyright © Oracle Corporation, 2014. All rights reserved. x.x.20.15 (S) Real Real Server Server
  • 6. One-Arm Mode – Full NAT • 네트워크 구성 변경이 없어 Inline 모드보다는 구성 용이 • LB 입장에서의 Request / Response • • Request : LB가 Real Server으로 Balancing할 때 Destination IP를 Real Server의 IP / Mac으로 변조하여 송신 Response : LB가 Real Server로부터 응답을 받아서 Source IP만 LB의 VIP로 변조하여 응답 x.x.1.1 (C) Client (User) x.x.1.1 (C) Client (User) S-IP S-IP D-IP x.x.1.1 x.x.10.10 x.x.10.10 x.x.1.1 S-MAC D-MAC S-MAC D-MAC C x.x.10.1 (R) D-IP L1 L1 C LB – VIP x.x.10.10 (L1) x.x.20.20 (L2) …. x.x.10.1 (R) LB – VIP x.x.10.10 (L1) x.x.20.20 (L2) …. S-IP S-IP D-IP x.x.20.20 x.x.20.35 x.x.20.35 x.x.20.20 S-MAC x.x.20.35 (S) D-IP D-MAC S-MAC D-MAC L2 S S L2 Real Real Server Server Copyright © Oracle Corporation, 2014. All rights reserved. x.x.20.35 (S) Real Real Server Server
  • 7. L2 DSR(Direct Server Return) Mode • DSR 모드는 송신 패킷에 비해 응답 패킷이 큰 Streaming, Multi-Media 및 Voice Over IP에서 주로 사용되는 모드로 LB를 통하지 않고 Client로 바로 응답하는 메커니즘을 사용 • LB와 Real Server가 동일 네트워크 대역 내에 있어야 함 (소규모용) • LB 입장에서의 Request / Response • • • Request : LB가 Real Server으로 Balancing할 때 Destination IP를 Real Server의 Mac으로 변조하여 송신 Response : Real Server가 LB를 통하지 않고 Source IP를 LB의 VIP로 변조하여 응답 LB – VIP (L) x.x.10.10 Real Server에 LB의 VIP로 Loopback Alias 만드는 이유 • • ARP로 Mac 주소 Broadcasting 방지 Real Server에서 LB의 VIP로 패킷을 내보내기 위한 Interface S-IP D-IP S-IP D-IP x.x.1.1 x.x.10.10 x.x.1.1 x.x.10.10 S-MAC D-MAC S-MAC D-MAC R L L S x.x.1.1 (C) Client (User) x.x.10.1 (R) x.x.10.15 (S) S-MAC S-IP D-IP S1 Copyright © Oracle Corporation, 2014. All rights reserved. D-MAC R x.x.10.10 x.x.1.1 Configure Loopback Alias x.x.10.10 Real Real Server Server Listen IP x.x.10.10
  • 8. L3 DSR(Direct Server Return) Mode • LB와 Real Server가 동일 네트워크 대역 내에 있지 않기 때문에 확장 용이 (대규모용) • LB 입장에서의 Request / Response • • • Request : LB가 Real Server으로 Balancing할 때 Destination IP를 Real Server IP / Mac으로 변조하여 송신 Response : Real Server가 LB를 통하지 않고 Source IP를 LB의 VIP로 변조하여 응답 Real Server에 LB의 VIP로 Loopback Alias 만드는 이유 • • LB – VIP (L) x.x.10.10 Configure DSCP ARP로 Mac 주소 Broadcasting 방지 Real Server에서 LB의 VIP로 패킷을 내보내기 위한 Interface S-IP D-IP S-IP D-IP x.x.1.1 x.x.10.10 x.x.1.1 x.x.20.15 S-MAC D-MAC S-MAC D-MAC R L L S1 Real Server iptables rewrite rule : x.x.10.10 x.x.1.1 (C) Client (User) x.x.10.1 (R) x.x.20.15 (S1) S-MAC D-MAC S-IP D-IP S1 R x.x.10.10 x.x.1.1 DSCP(Differentiated Services Code Point) 이용 방식 Copyright © Oracle Corporation, 2014. All rights reserved. Configure Loopback Alias x.x.10.10 Real Real Server Server Listen IP x.x.10.10 x.x.30.15 (S2) Real Real Server Server L3 DSR Kernel Module 구성 필요
  • 9. 참고 DSR – Mac Address Issues • DSR에서 LB의 VIP IP 주소를 Real Server에서 Loopback alias로 아래와 같이 설정 • ifconfig lb_vip_vnic up • ifconfig lb_vip_vnic :0 inet <LB VIP> netmask 255.255.255.255 up • Real Server에서 LB의 VIP IP 주소를 Loopback alias로 구성했지만 ARP Broadcasting이 발생하여 IP가 중복 이슈가 있을 수도 있어서 아래와 같이 ARP Broadcasting을 막도록 설정 • echo 1 > /proc/sys/net/ipv4/conf/lb_vip_vnic/arp_ignore • echo 2 > /proc/sys/net/ipv4/conf/lb_vip_vnic/arp_announce • 참고 사항 : 위의 방법대로 설정했음에도 불구하고 ARP 이슈가 해결되지 않을 때는 아래의 URL 참조 • RedHat 5와 RedHat 6의 설정값 의미가 변동 • https://www.centos.org/forums/viewtopic.php?t=8401 에서 발췌 • Both RHEL6 and RHEL5 ship with a default /etc/sysctl.conf that sets this sysctl to 1, but the meaning of this value is different between the RHEL6 and the RHEL5 kernel. • The problem is in a modification of rp_filter in RHEL 6. rp_filter = 1 worked fine in RHEL 5 and earlier versions. With RHEL 6 rp_filter needs to be set to 0 or 2 Copyright © Oracle Corporation, 2014. All rights reserved.
  • 10. L3 DSR(Direct Server Return) Mode • • • IP in IP라는 IP Tunneling 프로토콜 이용 방식 받은 IP Packet을 한번 더 IP 헤더를 붙여서 전달하는 방식 Outer IP 헤더에 Destination IP를 Real Server IP로 설정하여 실제 Real Server로 전달될 수 있게 함 • • • • • Outer IP Header Inner IP Header IP Payload LB는 Inner IP 헤더의 TOS 값을 Outer IP 헤더에 복사 이를 위해서는 Real Server에 IP in IP를 처리할 수 있는 Kernel Module을 구성 필요 DSCP(Differentiated Services Code Point) 이용 방식 IP in IP을 이용하는 방식과의 주요 차이는 Outer IP 헤더가 없는 것임 추가적인 Outer IP 헤더가 붙지 않기 때문에 특별히 Fragmentation에 대한 대비를 할 필요가 없음 참고 사항 : DiffServ uses the 6-bit Differentiated services Field (DS field) in the IP header for packet classification purposes. The DS field and ECN field replace the outdated IPv4 TOS field. (RFC 3260 : http://tools.ietf.org/html/rfc3260 ) Copyright © Oracle Corporation, 2014. All rights reserved. 참고 • • • • • • • URL http://en.wikipedia.org/wiki/IP_in_IP http://en.wikipedia.org/wiki/Type_of_service https://github.com/yahoo/l3dsr http://bogpeople.com/networking/dscp.shtml http://www.nanog.org/meetings/nanog51/presentations/Monday/NANOG51. Talk45.nanog51-Schaumann.pdf http://www.tucny.com/Home/dscp-tos http://tools.ietf.org/html/rfc2474 & http://tools.ietf.org/html/rfc2475
  • 11. 참고 : Citrix NetScaler DSR Mode • • Brocade(Foundry), Alteon, F5 등등의 Load Balancer 장비들은 DSR 모두를 제공하고 있으며 요즘 대부분의 Load Balancer 장비들은 TOS(DSCP)와 IP in IP(IP over IP) 방식 모두 제공하고 있음. 예로 NetScaler를 살펴봐도 모두 제공함. • • • http://support.citrix.com/proddocs/topic/netscaler-load-balancing-93/ns-lb-usecases-dsrmode-con.html http://support.citrix.com/proddocs/topic/netscaler-load-balancing-93/ns-lb-usecases-dsrmode-tos-tsk.html http://support.citrix.com/proddocs/topic/netscaler-load-balancing-93/ns-lb-usecases-dsrmode-tos-ipoverip-con.html Copyright © Oracle Corporation, 2014. All rights reserved.
  • 12. Physical Load Balancer Topology NAT-based, route-path, one-armed SLB NAT-based, route-path, two-armed SLB http://oreilly.com/catalog/serverload/chapter/ch07.html Copyright © Oracle Corporation, 2014. All rights reserved.
  • 13. Physical Load Balancer Topology NAT-based network topology with DSR redundancy scenario http://oreilly.com/catalog/serverload/chapter/ch07.html Copyright © Oracle Corporation, 2014. All rights reserved.
  • 14. OTD vs HAProxy vs NetScaler Copyright © Oracle Corporation, 2014. All rights reserved.
  • 15. OTD vs HAProxy vs NetScaler Copyright © Oracle Corporation, 2014. All rights reserved.
  • 16. Linux Virtual Server Copyright © Oracle Corporation, 2014. All rights reserved.
  • 17. Linux Virtual Server https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Virtual_Server_Administration/index.html Basic LVS Configuration LVS Implemented with NAT Routing LVS Implemented with Direct Routing (same as DSR) Copyright © Oracle Corporation, 2014. All rights reserved. Three-Tier LVS Configuration LVS Components
  • 18. Solaris Crossbow Copyright © Oracle Corporation, 2014. All rights reserved.
  • 19. Solaris Crossbow – Network Cloud Copyright © Oracle Corporation, 2014. All rights reserved.
  • 20. Solaris Crossbow – Network Cloud • http://docs.oracle.com/cd/E26502_01/html/E28993/gmhbd.html#gmhiq • Stateless DSR topology • NAT mode (full-NAT and half-NAT) topology NAT mode Topology Copyright © Oracle Corporation, 2014. All rights reserved. Stateless DSR Topology
  • 21. Thanks to DSR에 많은 정보와 도움을 주신 후배 이태근님에게 감사의 인사를 전하며… Copyright © Oracle Corporation, 2014. All rights reserved.