Download as pdf or txt
Download as pdf or txt
You are on page 1of 64

Oracle WebLogic Server

The #1 Application Server for


Enterprise Java and SOA Developers

APAC WebLogic Suite Workshop


Active GridLink for RAC
Presenter’s Name
Presenter’s Title
Workshop Focus

WebLogic Suite
Coherence EE WebLogic WLS Mgmt Pack IAS EE Java SE Suite
Server EE EE
• Data Grid • Active GridLink • Business • Forms & Reports • JRockit Mission
• TopLink Grid Transaction Control
• Active Cache & Management
Coherence*Web • Performance &
Diagnostics
• Lifecycle &
Configuration
Management

2
The following is intended to outline our general product
direction. It is intended for information purposes only, and
may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality,
and should not be relied upon in making purchasing
decisions.
The development, release, and timing of any features or
functionality described for Oracle’s products remains at the
sole discretion of Oracle.
Agenda
• Application Server Infrastructure at Oracle
• WebLogic RAC integration solutions
– WebLogic Multi Data Source
– WebLogic GridLink Data Source
– WebLogic GridLink Data Source Configurations
• WebLogic Active GridLink Features
– Fast Connection Failover
– Runtime Connection Load-Balancing
– Affinities (XA and WebSession Affinity)
– Connection Labeling
• DB Tlog and Proxy Authentication
• WebLogic GridLink Data Source Logging, Monitoring
• Competitive
Application Server Infrastructure at Oracle
Centered on WebLogic Server
Packaged SOA Cloud
Custom App
App Service Service
Application Grid
GlassFish Coherence
Developer WebLogic Enterprise
Tools Server Management
JRockit and HotSpot

Most complete Best integration with


platform for cloud #1 in Performance AND time- Oracle stack
to-market
What’s New in WebLogic Server?
Spring/
WebLogic Server 11g (10.3.4/5) Maven/Java EE
New Jan 2011
• Developer Experience WebLogic
RAC Integration

• Active GridLink for RAC New Jan 2011 Partitioned


Distributed
Topics
• Messaging New Jan 2011

3 Coherence
2 1 Integration
• ActiveCache New Jan 2011

Assembly Builder
• Java Virtualization New March 2011

Java SE Suite/EM
• Operations New May 2011 11g

Hardware/
• Exalogic Elastic Cloud New Jan 2011 Software Optimized

6
Extreme Java EE Performance
The power of using Active GridLink with Oracle RAC
250 450
(Higher is better)
400 (Lower latency is Better)
200 350

300
Tx/Sec

150
250

100 200

150
50
100

50
0
Update Insert Delete 0
CreateWS Purchase Manage Browse
Standard WebLogic Server GridLink for Exadata
Standard Platform Exalogic

2-3X improvement 60% more Up to 10X faster response time


in Database OLTP Java Operations/sec.

– Run Time Connection Load Balancing


– Fast XA Transaction Affinity
– Web Session Affinity

7
WEBLOGIC & ORACLE RAC

8
Oracle RAC
Seamless Scalability

• Start small, grow incrementally


• Scalable AND highly available
• Add capacity on demand with zero downtime

9
Oracle RAC
Flexibility, High Availability

• Complete availabilityCunlimited scalability


• Server hardware shared between applications

ERP ERP Test Web


DW CRM

ERP data Web data


Data A-
A-Z

DW data CRM data


10
Connecting WebLogic Server to RAC
Multi Data Sources, WebLogic GridLink Data Source
• Two different connection approaches
– Multi Data Sources, WebLogic GridLink Data Source
• Multi Data Sources
– Native implementation inside of WebLogic Server
– Designed around WebLogic Server transactions, datasources, connection pooling,
death detection
– Serves as an abstraction over a set of individual datasources
• WebLogic GridLink Data Source
– Simplified data source configuration for RAC and Services connectivity – Single
Data Source
– Leveraging RAC notifications to provide fast-connection-failover
– Improved load balancing and graceful RAC instance shutdown
– Improved RAC instance affinities

11
WebLogic Server Multi Data Sources
8.1sp5, 9.x, 10, 10.3

JNDI Data Source A


JDBC/mds
JDBC/mds close connection
connection

Multi Data Source


looku
p connection

JDBC Driver
Application A Exec
getConnection SQL
C
Data Source B
C C
Application N
Data Source C
C
WebLogic Server RAC

12
High Availability with Failover and Load Balancing
Multi Data Source Algorithms

• The principal aim of Multi Data Sources is to provide a highly


available connection source to applications
– Accommodates planned and unplanned outages of database
instances
• Multi Data Sources provide two algorithms to support high
availability
– Failover, connections serviced from first listed data source until it is
no longer available, then served from next data source
– Load Balancing, connections serviced from the full set of available
data sources using a round robin distribution

13
Active GridLink for RAC
• Simpler Configuration: single data source
• Event-Based Model (ONS and FAN) for Adaptive Pool Management
• SCAN Support
• Fast Connection Failover
• Runtime Connection Load Balancing
• Affinities for Connection Routing (XA, Session, Data)
• WebLogic Connection Labeling
• Data Guard Support
• RAC One Node Support
WebLogic Domain Oracle Database

Database Notification
Service
Oracle
WebLogic Cluster Datasource
Node Manager

Managed GridLink
Server1 Data Source RAC Node 1 RAC Node 2

Service
Oracle
Managed RAC Aware
Server2 Connection Pool
RAC Node 3 RAC Node 4
Active GridLink for RAC for Fusion Middleware
Certification Targeted for Fusion Middleware 11g (10.3.6)

Active GridLink for RAC Configuration Wizard


WebLogic UCP-RAC Module
WebLogic Server

RAC (1)
Single WLS connection
Service A

Polling
pool for service A
ONS Daemon

Advisories

ONS Daemon

ONS client
UCP-RAC module
RAC (2)
Service A
SCAN
• A single name for clients to access Oracle Databases
running in a cluster
– Dynamic client configuration with backend changes
– Listener failover
– Connect time load balancing
• WebLogic Data Sources support for SCAN
– Generic Data Source – supports SCAN without runtime failover
and load-balancing
– Multi Data Source – support SCAN configuration, no real
functionalities
– Active GridLink- fully support SCAN
SCAN Configuration
ORCLservice =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = sales1
scan.example.com)(PORT = 1521))
(CONNECT_DATA =
SERVER = DEDICATED)
(SERVICE_NAME = MyORCLservice)
))
WebLogic GridLink Configuration
GridLink Data Source SCAN Configuration
SCAN Address
GridLink Data Source SCAN Configuration
ONS Configuration
FAST CONNECTION FAILOVER

22
Customer Pain Points
• Database outages (servers, databases, storage, networks) have
a significant impact on the user experience.

• Users are left not knowing what happened to their funds


transfers, time sheets, orders, bill payments and so on.

• The user sees a horrible error stack, loses screens of


entered and uncommitted data, and needs to login again
and re-enter or resubmit that data, sometimes leading to
logical corruption.
Administrator Pain Points
• In worst cases, the administrator is forced to restart the mid-tier
system both at outage and at restore.

• Customer admin complaint -


– “When the shutdown system is re-introduced, the system needs to be
rebalanced. The demand remains low on the re-introduced RAC node, while
the pressure on remaining nodes stays high because the application
sessions stay connected and cannot be migrated.”

• For planned operations such as patch apply, maintenance and


repairs, there is an unsatisfied need to migrate load across RAC
nodes without the users perceiving the outage.
Active GridLink for RAC
Fast Connection Failover – WebLogic Server 11g(10.3.4)

• Rapid database failure detection


• Aborts and removes invalid connections from the pool
• Supports unplanned and planned outages
• Encapsulates fatal connection errors and exceptions into the
isValid API for robust and efficient retries
• Recognizes new nodes that join an Oracle RAC cluster
• Distributes runtime work requests to all active Oracle RAC
instances
How FCF Works

RAC
Fail-over Handler Database
Thread

X
X
X
Start ONS Subscribe
X
Instance1

Instance2
Handle Event ONS Publish
WebLogic RAC Instance3
AwareConnection Pool
RUNTIME CONNECTION
LOAD BALANCING

27
Active GridLink for RAC
Runtime Connection Load Balancing – WebLogic Server 11g(10.3.4)
• Manages pooled connections for high performance and
scalability
• Receives continuous recommendations on the percentage of
work to route to Database instances
• Adjusts distribution of work based on different backend node
capacities such as CPU capacity or response time
• Reacts quickly to changes in Cluster Reconfiguration,
Application workload, overworked nodes or hangs
How RCLB Works

RAC
Database
30% connections

WebLogic I’m busy


Connection Pool Instance1
10% connections
Application
I’m very busy

I’m idle Instance2

60% connections
Instance3
XA TRANSACTION AFFINITY

30
Active GridLink for RAC
XA Transaction Affinity – WebLogic Server 11g(10.3.4)

• Enables XA and RAC to work together with optimal


performance – Eliminates current single DTP service
limitation for XA/RAC
• Transaction affinity is the ability to automatically localize a
global transaction to a single RAC instance
• Transaction Affinity scope is the life of a global transaction
– first connection request for a global transaction uses RCLB
– subsequent requests uses affinity and are routed to the same
RAC instance when XA first started
Transaction Based Affinity

RAC
Database
TX Client 2
TX Client 1

Instance1

Instance2
WebLogic Connection
Pool
Connection
Affinity Context Instance3
How Transaction Based Affinity Works

• Affinity scope determined by the transaction lifecycle and


database failure events
• Affinity Contexts
– Stored within application and accessed via Affinity Callback
– Cleared by application after transaction completes
– Can be propagated with transaction contexts
• Affinity Callback
– Used by the pool to store and retrieve Affinity Contexts
WEB SESSION AFFINITY

34
Active GridLink for RAC
Web Session Affinity – WebLogic Server 11g(10.3.6)

• The first connection request uses RCLB to select a


connection
• Subsequent requests enforce Affinity
• Connection selection falls back to RCLB after Affinity ends
• Affinity is only a hint
– Pool resorts to RCLB whenever a desired connection is not found
Active GridLink for RAC
Web Session Affinity – WebLogic Server 11g(10.3.6)
Application
RAC
Database
Data
EJB Source

Data
JSP Source
Instance1
Connect to me
Servlet Data
Source

Instance2
WebLogic Server Web Logic Connection
Pool
Connection
Affinity Context Instance3
How Web Session Based Affinity Works

• Affinity scope determined by the HTTP Session lifecycle and


database failure events
• Affinity Contexts
– Stored within session cookie and accessed via Affinity Callback
– Cleared by application after session completes
– Can be propagated within the http session
• Affinity Callback
– Used by the pool to store and retrieve Affinity Contexts
Web Session Affinity Performance
Cluster Wait Time – Random Workload
Cluster Wait Time - Random Workload Affinity Enabled
25 Threads - 20ms think time - 100 Total Connections
Affinity Disabled
250
Cluster with Moving Average (ms)

200

150

100

50

0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34

30 second interval

38
CONNECTION LABELING

39
Active GridLink for RAC
Connection Labeling – WebLogic Server 11g(10.3.6)
• Database Connections are Expensive to create, setup, warm-up, hold and
destroy
• Performance feature that allows applications to request pre-configured
connections from the pool
• Typically used to offset connection setup and warm-up cost
• A connection label is defined as <key, value> pairs
• WebLogic Connection Pool allows applications to customize connections.
– NLS language
– Transaction isolation level
– ROLE
How Connection Labeling Works

Register Callback
Callback cost
20
10 30
Request Labels
Application
Callback configure
WebLogic Connection Pool

10
Return Connection
DATA GUARD SUPPORT

42
Active GridLink with Data Guard
Global Load Balancer
Active Site Standby Site
Web Tier Web Web Web Web
Web Tier
Server Server Server Server

Middle Tier Middle Tier


Binaries Binaries

GridLin
Configuration GridLin
Configuration
k Data k Data
Transaction Sourc
Logs Transaction Logs
Sourc
JMS Messages JMS Messages

Connection Requests Connection Requests


Data Tier Data Tier

Application Data Data Guard Application Data


Data Guard Configuration
SALES= (DESCRIPTION_LIST= 12
(LOAD_BALANCE=off)
(FAILOVER=on)
(DESCRIPTION= (CONNECT_TIMEOUT=5)(TRANSPORT_CONNECT_TIMEOUT=3)
(RETRY_COUNT=3)
(ADDRESS_LIST= (LOAD_BALANCE=on)
(ADDRESS=(PROTOCOL=TCP)
(HOST=Austin-scan)(PORT=1521)))
(CONNECT_DATA=(SERVICE_NAME=oltpworkload))) (
DESCRIPTION= (CONNECT_TIMEOUT=5)(TRANSPORT_CONNECT_TIMEOUT=3)
(RETRY_COUNT=3) (ADDRESS_LIST= (LOAD_BALANCE=on)
ADDRESS=(PROTOCOL=TCP)(HOST= Houston-scan)(PORT=1521)))
(CONNECT_DATA=(SERVICE_NAME=oltpworkload))))
Active GridLink for RAC
Feature Comparison
Feature WebLogic Version Perf ormance/HA Devopment/Config

FCF 10.3.4 High Availability Configuration

RCLB 10.3.4 Performance Configuration

XA Affinity 10.3.4 Performance Configuration

Session Affinity 10.3.6 Performance Configuration

Labeling 10.3.6 Performance Development

SCAN Support 10.3.4 Performance, Lower cost Configuration

Data Guard 10.3.4 High Availability Configuration


WEBLOGIC TRANSACTION
LOGS => DATABASE

46
Web Logic Data Base TLOG (Transaction Log)
• Disaster recovery: A robust site-wide disaster recovery solution is provided
where all data is consistent and synchronized.
• Admin: The Oracle database/data guard is easier to manage than shared
file systems and replication software
• Availability: The db tlogs store is extremely resilient in the face of database
access failures
• Cost: Shared storage, cost efficient solution
• Performance:
– There is no performance loss compare with file-based transaction logs
– optimal configurations a performance advantage may be seen
• Competitive: No other vendor provides database persistent of transaction
logs and the advantages listed
Current Guidance for Disaster Recovery
Architectures
Global Load Balancer
Active Site Standby Site
Web Tier Web Web Web Web
Web Tier
Server Server Server Server

Middle Tier Middle Tier


Binaries Binaries

Configuration Configuration
File Replication Technology
Transaction Logs Transaction Logs
Separate replication
JMS Messages JMS Messages
technologies
Hard to keep in sync
Data Tier Possible limited Data Tier
transaction loss
Application Data Datagard or GoldenGate Application Data
New Disaster Recovery Architectures
with WebLogic Server 10.3.6
Global Load Balancer
Active Site Standby Site
Web Tier Web Web Web Web
Web Tier
Server Server Server Server

Middle Tier Middle Tier


Non-critical files replicated
Binaries separately from critical
File Replication Binaries

Configuration
data.
Technology Configuration

No need to struggle to
synchronize file and data
replication
Data Tier Data Tier
Transaction Logs Critical data stored, Transaction Logs
Datagard or GoldenGate
managed, and
JMS Messages JMS Messages
replicated together
Application Data Application Data
PROXY AUTHENTICATION

50
Proxy Authentication

• Allows a client user to connect to the database through an


application server, as a proxy user
• The client user authenticates itself with the application server
• Application server authenticates itself as the proxy user with
the Oracle database
• The client user's name is maintained all the way to the
database on any proxy connection opened this way.
• Works with Virtual Private Database
Proxy Authentication

Oracle
Database

User logs in with password or SSL

Instance1
Authenticate the users and set the user
WebLogic Server roles
Admin Console
Instance2
Runtime Development
Authenticates the users, set
the user roles and pass to
Services Management Monitoring the middletier
Instance3
User Security Storage
Proxy Authentication
• Authorizes the middle-tier server appserve to connect as user bill
activating all roles associated with bill, except payroll.
ALTER USER bill
GRANT CONNECT THROUGH appserve
WITH ROLE ALL EXCEPT payroll;

• Authorize a user to be proxied, but not authenticated, by a middle


tier.
ALTER USER bill
GRANT CONNECT THROUGH appserve
WITH ROLE ALL EXCEPT payroll;
Proxy Authentication Benefits

• Separate application logic from data storage


• Application servers and Web servers enable users to access
data stored in databases.
• Lower computing cost by replacing thick clients with
numerous thin clients and an application server.
• A limited trust model, by controlling the users on whose
behalf middle tiers can connect and the roles that the middle
tiers can assume for the user
WebLogic Proxy Authentication Configuration
• Configure a WLS connection pool to enable proxy sessions
through the oracle-proxy-session element
• WLS opens a proxy session each time a connection request
is made on the pool
• The credential mapper is used to map the WLS user to the
database user
• The proxy session is closed when the connection is returned
to the pool
• Requires that the application user exist in the database and
be granted the proper CONNECT THROUGH privileges
MONITORING & LOGGING

56
Web Logic Data Source Monitoring
GridLink Data Source Monitoring
GridLink Data Source Monitoring
• Graphical view using
• http://<host>:<port>/console/dashboard
WebLogic GridLink Data Source Debug
Logging
• Start WebLogic Server with specific System Properties
– -Dweblogic.debug.DebugJDBCRAC=true
• Outputs GridLink data source lifecycle, UCP callback,
connection information
– -Dweblogic.debug.DebugJDBCONS=true
• Enabled ONS client logging
• LBA event body
– -Dweblogic.debug.DebugJDBCUCP=true
• Enables UCP Logging at FINEST level
WebLogic Admin Console
• Enabling debug categories
– domain > Environment > Servers > server > Debug > weblogic >
jdbc > rac
• JDBCRAC
• JDBCONS
• Link to console help section on data source statistics
– http://download.oracle.com/docs/cd/E12839_01/apirefs.1111/e139
52/pagehelp/J2EEappdeploymentsmonitorjdbctabletitle.html
• Configure WLS logging to send stdout to server log
– domain > Environment > Servers > server > Logging > General >
Advanced > Redirect stdout logging enabled
COMPETITIVE

62
Active GridLink for RAC
Competitive Comparison
App Server Connection Pool RAC Integration Limitations

Native implementation Integration with UCP N/A


WebLogic with RAC support RAC modules

Native implementation Integrated with 10g No XA, No Affinities ,No


WebSphere RAC ICC/FCF, SCAN support
No 11g UCP support No Labeling, No 11g
Enhancements
Native implementation No integration Only leverages Oracle
JBoss JDBC Driver features
No XA, No Affinities, No
SCAN, No FCF, No
RCLB, No Labeling, C.
<Insert Picture Here>

Oracle WebLogic Workshop – Active GridLink for RAC

Frances Zhao
Oracle WebLogic Server Product Management

You might also like