hpux 와 오라클 db 의 ha 아키텍처 구성 황 명 석 한국 hp / 2004.3.18 2004 mar mc...
TRANSCRIPT
HPUX 와 오라클 DB 의 HA 아키텍처 구성
황 명 석
한국 HP / 2004.3.18
2004 MAR
MC Seminar
Agenda
1. Parallel Hardware Architecture
2. Oracle RAC 성능
3. Oracle RAC 와 hp Cluster Type
4. Oracle RAC 의 TAF
Parallel Hardware Architecture
Parallel Hardware Architecture
Parallel Hardware Architecture
•Tightly Coupled System•Loosely Coupled System•Massively Parallel System
Tightly Coupled System
• 다수의 CPU 가 memory 공유• 각 CPU 는 common Bus 를 통해 shared memory
access• Performance 는 Memory Bus 의 Bandwidth 에
의해 결정• SMP System (Symmetric Multiple Process)
Loosely Coupled Systems
• Loosely Coupled systems (cluster) 의 shared disk 는 하드웨어 레벨에서 구현 .
• Shared disk system 는 물리적으로 cluster node 간에 동일한 disk array 를 공유 .
Shared Nothing Implementations - MPP
• Shared Nothing Implementations - MPP– 각 노드는 하나 이상의 CPU 를 갖는다 .– 메모리는 노드간에 공유하지 않는다 .– High-speed interconnect 사용을 기반으로 한다 .– File 의 I/O request 는 user program 에게 투명한 high-
speed interconnect 를 통하여 remote disk 를 accessing 한다 .
Oracle RAC 의 성능Oracle RAC 의 성능
e-Business 시대의 RAC 필요성
e-Business 요구사항 높은 가용성 (High Availability) 높은 확장성 (High Scalability) 높은 서비스품질 (High Quality Of Services) 시장의 확대 (Extend Market – Globalization) DBA 생산성 향상 On-Line Management Business intelligence E-business 를 위한 개발 환경
Cache Fusion Architecture
• 완벽한 Cache Fusion– Cache-to-Cache
데이터 전송– 공유 캐쉬는 느린 I/O
작업을 줄인다 .– 데이터는 고성능
interconnect 를 통해 다른 노드에 직접 전송
• 확장성 제공
Oracle9i RAC Scalability
HP-UX 기반 Platform 에서의테스트 결과
Oracle RAC 와 hp Cluster Type
Oracle RAC 와 hp Cluster Type
HP ServiceGuard ClusterProtection Levels
• single cluster
• within single
data center
• automatic failover
• single cluster
• same site, separate bldgs
• automatic failover
• single cluster
• same city, separate sites
• automatic failover
• multiple clusters
• different cities, different countries
• “Push-button” failover
LocalCluster
Campus
Cluster
Metro Cluster
Continental
Cluster
FlexibilityFunctionality
Distance
Local Cluster supported with 9i RAC
• Distances• up to 500m with direct FC
• up to 11km with FC switches (500m to switch, 10km between switches)
• up to 25m with direct SCSI
• Single Cluster
• Automatic Failover
Data Center 1 Storage
RAC
Node A Node B
within single data center
Campus Cluster supported with 9i RAC
• Distances• up to 10km with Oracle9i RAC with FC switch/hub
• up to 100km only with MC/SG (extended CampusCluster) with DWDM
• Single Cluster
• Automatic Failover
• Software Mirroring with HP MirrorDisk/UX
• Only 2 node cluster supported with RAC & SLVM, and 4 nodes supported with RAC & Veritas CVM.
• For all storage types
Data Center 1 Data Center 2
Storage Storage
RAC
Node A
MirrorUX
Node B
MirrorUX
same site, separate buildings
Metro Cluster not supported with 9i RAC
• Distances for CA/SRDF• ESCON, ca. 43km• FC direct, ca. 500m• FC switches, ca. 10km• FC switches plus ultra long haul GBIC ca. 80km• DWDM, ca. 100km
• Single Cluster
• Rapid, automatic site recovery without human intervention
• Storage Hardware Mirroring
• separate arbitrator for split brain situations
Data Center 1 Data Center 2
XP/EMC XP/EMC
MC/SG
Node A Node B
Node CArbitrator
CA / SRDF
same city, separate sites
Continental Cluster supported with 9i RAC
• Distances•Unlimited distance between data centers!
• Separate Cluster
• Locate data centers at economically and/or strategically best locations
• “Push-button” failover across 1000s of km
different cities, different countriesData Center 1 Data Center 2
XP/EMC
RAC
Node A Node B
XP/EMC
RAC
Node A Node B
WAN
Oracle DataGuard supported with 9i RAC
•Distances• no limitation for Oracle DataGuard
• RAC cluster in one data center
• Changes get propagated to second data center
with Oracle DataGuard (formerly Automated Standby Database)
disaster tolarantData Center 1 Data Center 2
Storage
RAC
Node A Node B Node C
Storage
OracleDataGuard
Standby Database History 정리
• Oracle Version 7.3 custom Standby Databases– Current Log 반영 불가 (Only transferred arch. files)
• Oracle8i Automated Standby– Read only databases, Managed recovery– Remote archiving
• Oracle8i Data Guard– Automation: Single command switchover and failover– OPS and OFS support
• Oracle9i Data Guard– Built in zero Data Loss capability (Current log 반영 )– GUI interface integrated with OEM
• Oracle9i R2 Data Guard– Oracle9i Data Guard Logical Standby database– SQL apply instead of log– Query & Reporting enabled
Oracle RAC 의 Transparent Application Failover
Oracle RAC 의 TAFOracle RAC 의 TAF
page 27
What do you want to avoid?
•Database connections are stateful, simple network failover is insufficient
•Even after a fast database recovery clients were forced to exit their application and reconnect to the database•Very intrusive
•Work lost
page 28
Client Side Load Balancing
• Clients connect to instance using random method (uses address list in tnsnames.ora)
Node 1
rac2instancelsnr2
9iRACDatabase
rac1instancelsnr1
Node 2
Netw
ork
Client 1
Client 2
Client 3
Client n
page 29
Listener Load Balancing
• Listeners balance load using CPU/user load
Node 1
rac2instancelsnr2
9iRACDatabase
rac1instancelsnr1
Node 2
Netw
ork
Client 1
Client 2
Client 3
Client n
page 30
Listener Load Balancing
• Listeners balance load using CPU/user load
Node 1
rac2instancelsnr2
9iRACDatabase
rac1instancelsnr1
Node 2
Netw
ork
Client 1
Client 2
Client 3
Client n
page 31
Connect Time Failover
• Automatically retries the connection (uses the next entry in the address list in tnsnames.ora)
Client
TNS
Node 1
rac2instancelsnr2
9iRACDatabase
rac1instancelsnr1
Node 2
page 32
TAF, Overview
• Oracle9i provides a high availability architecture that provides transparent client failover capability–Little or no user downtime –Applications and users are automatically and
transparently reconnected to another system
–Applications and queries continue uninterrupted–Login context maintained
ComputerComputer
AAComputerComputer
BBComputerComputer
AAComputerComputer
BB
Node A in an RAC cluster fails, users
are migrated
page 33
Characteristics of TAF
• TAF protects or fails-over:• Client/server connection
• User session state
• Active cursors (select statements) that have begun to return results
• Not failed over: - Active update transactions - PL/SQL server-side package variables
page 34
Three “Levels” of TAF Functionality
• TYPE=SESSION, METHOD=BASIC (Login Failover)•Client is automatically logged into surviving node of cluster
• TYPE=SELECT (Statement Failover)
•Node failure occurs during query
•Client fails over to a surviving node and is logged in
•Query replayed on surviving node but only rows not returned
during the original query execution are returned
• METHOD=PRECONNECT (“Fast” Session Failover)
•Client connected to two instances at session establishment
•Avoid impact of “login storm” during failover to surviving node in
Real Applications Cluster or Oracle Parallel Server
page 35
TAF Select Failover
• Failover allows the application to continue execution or fetching
• Leverages Oracle’s multi-versioning read consistency to ensure results are identical
SELECT * FROM emp; SELECT * FROM emp;
Instance 2
Client
empno name
7369 Smith7499 Allen7521 Ward7566 Jones7654 Martin7698 Blake
Instance 1
DB
empno name
7369 Smith7499 Allen7521 Ward7566 Jones7654 Martin7698 BlakeRows Partially Returned
When Failover Occurred
Continues ReturningRemaining Rows from here