SCAN 리스너 로드 밸런싱 Enhanced features in 12c


 Cluster내의 데이터베이스들을 대표하는 일종의 Cluster alias


 Oracle 11g R2 버전에서 처음 소개가 되었고 12c 에서 새로운 기능 들이 추가됨


 이점:

– Node추가, IP변경 등의 Server 쪽 접속정보가 변경 되더라도 client의 접속 정보는 영향을 받지 않음

– Client의 TNS설정에 별도의 failover 설정이 필요치 않음

– Node/Instance load에 따른 connection load balancing


 Requirements for using SCAN

– Name resolution


 Corporate DNS or GNS or host file

– Require 3 IPs for SCAN VIP


 Using the corporate DNS


 Using the Oracle Grid Naming Service(GNS)

 SCAN을 사용시 Database 및 Client 버전에 따른 고려사항


 동일 subnet에서 다중 SCAN port 설정


 지원버전: 11.2.0.2, 11.2.0.3 BP16(GI PSU 6) 이상 또는 12c


단, 11.2.0.3 ~ 11.2.0.3 BP15 의 경우 버그로 인해 지원 안됨


 설정방법

– oracle@:/home/oracle>srvctl modify scan_listener –p TCP:1521/TCP:1527

– oracle@:/home/oracle>srvctl stop scan_listener

– oracle@:/home/oracle>srvctl start scan_listener

– oracle@:/home/oracle>srvctl config scan_listener

SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521,1527



 New Features in 12c

– SCAN and Clusterware managed VIP support IPv6 based IP addresses

– SCAN is by default restricted to only accept service registration from nodes in the cluster

– SCAN supports multiple subnets in the cluster (one SCAN per subnet)


 1. SCAN and VIP support IPv6

oracle@:/home/oracle> srvctl config scan

SCAN name: blueone-scan, Network: 1

Subnet IPv4: 100.100.100.0/255.255.255.0/bondeth0

Subnet IPv6:

SCAN 0 IPv4 VIP: 10.1.1.180


 2. SCAN is by restricted to only accept service registration from nodes in the cluster

– 보안 강화를 위해서 Cluster내에 있는 database instance만 SCAN listener 등록을 허용함

– 이를 위해, 기본적인 등록은 private interconnect를 사용하여 진행됨

– 만약 cluster내의 private interconnect를 사용할 수 없거나 접근할 수 없는 database의 경우

Node또는 Subnet 단위로 아래와 같이 scan_listener 수정을 통해 추가 가능함


oracle@:/home/oracle> srvctl modify scan_listener -invitednodes test –update

oracle@:/home/oracle> srvctl config scan_listener

SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521

Registration invited nodes: test

Registration invited subnets:

SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521

Registration invited nodes: test

Registration invited subnets:

SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1521

Registration invited nodes: test

Registration invited subnets:


 3. Supports multiple subnets in the cluster(one SCAN per subnet)

– Needs to be enabled as a post-installation task

– Procedures

 1. Create additional subnet(s) on the (public) network(s)

 2. Assign node VIPs to newly created subnet(s)

 3. Create a node Listener for newly created subnet(s)

 4. Create (a) SCAN(s) using the option one or two

 5. Create and start a SCAN listener on the network


 Multiple Subnet SCAN Listener 구성 예시

# ADD network interface

oracle@:/home/oracle> oifcfg setif -global eth0/10.179.112.0:public

# ADD network resource

[root@ ~]# /u01/app/12.1.0.1/grid/bin/srvctl add network -netnum 2 -subnet 10.30.1.0/255.255.255.0/eth0

# ADD node VIPs

[root@ ~]# /u01/app/12.1.0.1/grid/bin/srvctl add vip -node blueone -netnum 2 -address blueone-newvip/255.255.255.0

[root@ ~]# /u01/app/12.1.0.1/grid/bin/srvctl add vip -node blueone -netnum 2 -address blueone-newvip/255.255.255.0

# ADD node listener on network number 2

oracle@:/home/oracle> srvctl add listener -listener LISTENER2 -netnum 2 -endpoints "TCP:1528"

# ADD SCAN on network number 2

[root@ ~]# /u01/app/12.1.0.1/grid/bin/srvctl add scan -scanname blueone-scan2 -netnum 2

# START node VIPs

[root@ ~]# /u01/app/12.1.0.1/grid/bin/srvctl start vip -vip blueone-newvip

[root@ ~]# /u01/app/12.1.0.1/grid/bin/srvctl start vip -vip blueone-newvip

# START LISTENER2 node listener on network number 2

oracle@:/home/oracle> srvctl start listener -listener LISTENER2

oracle@:/home/oracle> srvctl status listener -listener LISTENER2


 Multiple Subnet SCAN Listener 구성 예시


# START SCAN on network number 2

[root@blueone ~]# /u01/app/12.1.0.1/grid/bin/srvctl start scan -netnum 2

# ADD and START SCAN_LISTENER to network number 2

oracle@blueone:/home/oracle> srvctl add scan_listener -netnum 2 -listener LISTENER2 -endpoints TCP:1528

oracle@blueone:/home/oracle> srvctl start scan_listener -netnum 2

oracle@blueone:/home/oracle> lsnrctl stat LISTENER2_SCAN1_NET2

STATUS of the LISTENER

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

Alias LISTENER2_SCAN1_NET2

Version TNSLSNR for Linux: Version 12.1.0.1.0 - Production

Start Date 23-FEB-2014 15:15:30

Uptime 0 days 0 hr. 1 min. 46 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File /u01/app/12.1.0.1/grid/network/admin/listener.ora

Listener Log File /u01/app/oracle/diag/tnslsnr/blueone/listener2_scan_scan1_net2/alert/log.xml

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER2_SCAN1_NET2)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=100.100.1.5)(PORT=1528)))

The listener supports no services

The command completed successfully



사업자 정보 표시
(주)블루원 | 김홍태 | 서울특별시 용산구 원효로 4가 135 금홍 2빌딩 | 사업자 등록번호 : 106-86-76684 | TEL : 02-3272-7200 | Mail : support_ora@blueone.co.kr | 통신판매신고번호 : 호 | 사이버몰의 이용약관 바로가기

+ Recent posts