Upload
others
View
49
Download
1
Embed Size (px)
Citation preview
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Oracle WebLogic Integration with Oracle Database 12c
Colin D. Harnwell Middleware sales Consultancy
Oracle Confidential – Internal/Restricted/Highly Restricted
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
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.
Oracle Confidential – Internal/Restricted/Highly Restricted 3
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Agenda
• Active GridLink for RAC
• Summary – Oracle WLS Integration with Oracle Database 12c
• Application Continuity and Transaction Guard
• Database Resident Connection Pools
• Pluggable Database
• Auto ONS
• Global Data Services
• Demo: Application Continuity in WLS
Oracle Confidential – Internal/Restricted/Highly Restricted 4
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Agenda
• Active GridLink for RAC
• Summary – Oracle WLS Integration with Oracle Database 12c
• Application Continuity and Transaction Guard
• Database Resident Connection Pools
• Pluggable Database
• Auto ONS
• Global Data Services
Oracle Confidential – Internal/Restricted/Highly Restricted 5
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
• Start small, grow incrementally
• Scalable AND highly available
• Add capacity on demand with zero downtime
Oracle RAC Seamless Scalability
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
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
– Leverage Database notifications (ONS and FAN)
– Provide fast-connection-failover
– Improved load balancing and graceful RAC instance shutdown
– RAC instance XA and WebSession Affinities
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
WebLogic Server Multi Data Sources 8.1sp5, 9.x, 10, 10.3.x, 12c
Data Source B …
Data Source C …
WebLogic Server RAC
Application A
Application N
…
…
JNDI
jdbc/MDS
Mu
lti D
ata
Sou
rce
Data Source A
JDBC Driver
connection
connection
connection
close
lookup
getConnection Exec SQL
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
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
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 10
WebLogic Cluster
WebLogic Domain
Managed Server1
Managed Server2
GridLink Data Source
RAC Aware Connection Pool N
od
e M
anag
er
Datasource
Oracle Database
RAC Node 2 RAC Node 1
Ora
cle
N
oti
fica
tio
n
Serv
ice
RAC Node 4 RAC Node 3
Ora
cle
Dat
abas
e
Serv
ice
• Simpler Configuration: single data source
• Event-Based Model (ONS and FAN) for Adaptive Pool Management
• Fast Connection Failover
– Database Graceful Planned Shutdown
– Database Unplanned Shutdown
– Database New Instance Rejoin
• Runtime Connection Load Balancing
• XA and WebSession Affinities for Connection Routing
• SCAN (Single Client Access Name) Support
• Data Guard and Active Data Guard Support
Active GridLink for RAC
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Agenda
• Active GridLink for RAC
• Summary – Oracle WLS Integration with Oracle Database 12c
• Application Continuity and Transaction Guard
• Database Resident Connection Pools
• Pluggable Database
• Auto ONS
• Global Data Services
Oracle Confidential – Internal/Restricted/Highly Restricted 11
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
GridLink
WebLogic
GridLink
WebLogic
WebLogic Integration with Oracle RAC Up to 3x better performance with Active Grid<Link for RAC
• Integrated WebLogic and Database RAC clusters
• Dynamic load balancing of requests to RAC nodes
• RAC node transaction affinity for data locality
• Continuous connection availability regardless of RAC changes
80% 20%
RAC Node Load Aware Connection Requests
GridLink
WebLogic
GridLink
WebLogic
RAC Node Affinity For Transactions
XA
GridLink
WebLogic
GridLink
WebLogic
Continuous Connections Regardless of RAC Changes
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
WebLogic Server and Database 12c Integration Continuous Availability, Performance at Scale, Multi-Tenancy Focus
• WebLogic Server with Database 12c
– WebLogic 12.1.2 - new feature integration
– WebLogic 10.3.6, 12.1.1 – certification
• Continuous Availability capabilities
– Transaction Guard and Application Continuity
• New scalability integration - Middle Tier Performance at Cloud Scale
– Database Resident Connection Pools
• Multi-Tenancy Support
– Oracle Pluggable Database
DBMS Resident Connection Pool
Oracle Database RAC
Replay Read/Write
Based on Transaction Guard Information
WebLogic Domain 1
WebLogic Domain 2
WebLogic Domain n … 100’s
Pluggable DB 1 Pluggable DB 2
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Application Scalability with Connection Sharing Database Resident Connection Pooling
DRCP
WebLogic WebLogic
WebLogic WebLogic
Busy
Idle
Database 12c
VIRTUALIZATION
OF DATABASE CONNECTIONS
Better sharing and more efficient
use of Database resources
Data sources attach/detach
connections automatically
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
WebLogic Domain 1
Data-Source
Multi-Tenancy at Middle and Data Tiers
Application 1: Get Connection to PDB 5
1 2
2
5
1 1 2
4 4
Container Database
PDB1 PDB 2 PDB 3 PDB 4 PDB 5 PDB 6
SIMPLIFY
CONFIGURATION
Hosted on single container:
Configured a single data-source
Pools connections to all tenant
databases
Increases elasticity, scalability,
and enables multi-tenancy
Appears as ‘Regular’ Database to WebLogic
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
WebLogic Server Certification with Oracle Database 12c
Oracle Confidential – Internal/Restricted/Highly Restricted 16
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Agenda
• Active GridLink for RAC
• Summary – Oracle WLS Integration with Oracle Database 12c
• Application Continuity and Transaction Guard
• Database Resident Connection Pools
• Pluggable Database
• Auto ONS
• Global Data Services
Oracle Confidential – Internal/Restricted/Highly Restricted 17
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Application Continuity - Overview
• Application-independent utility to recover work
• Masks system, communication and hardware failures from user
• Leverages Oracle DB at-most-once semantics
– Retries requests ‚offline‘ without risk of duplication
• Database 11g: Application Continuity with Read operations Database 12c: With Transaction Guard allows the failover of local transactions (currently not XA transactions, and cannot be used with PL/SQL proxy authentication, DRCP)
• Application Continuity re-establishes database sessions and re-submits the pending work for recoverable errors (FAN unplanned or planned interruption or recoverable error)
• Transaction Guard supplies a unique logical transaction identifier (LTXID) for each database transaction. This identifier can be used to query the Commit outcome
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Application Continuity – WLS Configuration
• Configure a GridLink data source with oracle.jdbc.replay.OracleDataSource as the connection factory
– Supports FAN/Fast Connection Failover and Runtime Load Balancing for FAST error detection and smart rebalancing
• Requires a single pool data source to allow the driver to reconnect to a different instance following a failure
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Application Continuity in WLS – how it works
• WLS creates connection and enables Begin ... End Replay into RAM
• Subsequent connections are remembered until final Commit
• At End statement, connection returned to pool
• Upon failure, the invalid database session is replaced
– A new connection request triggers a call to the registered Reconnect Callback
– WebLogic implementation of the method getNewPhysicalConnection() re-uses the previous data source properties with the new connection
– Updates affinity context in the pool
• Replay configuration
– replay-initiation-timeout MBean parameter (none … 3600s) Best practice: setting is to match the HTTP timeout value
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Agenda
• Active GridLink for RAC
• Summary – Oracle WLS Integration with Oracle Database 12c
• Application Continuity and Transaction Guard
• Database Resident Connection Pools
• Pluggable Database
• Auto ONS
• Global Data Services
Oracle Confidential – Internal/Restricted/Highly Restricted 21
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Database Resident Connection Pools (DRCP)
• Mitigate the cost of setting up/tearing down idle persistent connections created by mid-tier data sources
– E.g. 10 WLS datasources @ initial 10 connections means 100 connections/sessions at startup
• Allow multiple web-tier and mid-tier data sources to share Oracle Database server processes and sessions (together known as pooled servers)
• Most effective when the database connections are not always in use
• DRCP guarantees that the pooled connections are never shared across different users. However, it does allow connections to be shared and pooled across different instances of the same application.
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Database Resident Connection Pools – how it works • Upon requesting a connection from the Oracle
WebLogic Server data source, the appropriate pooled connection is handed-off.
• Oracle WebLogic Server directly communicates using the pooled connection for all database activity.
• The pooled connection is handed back when the data source releases it.
• WebLogic integration with DRCP works with
– Active GridLink for RAC
– Generic data sources using Oracle Database 12c and JDBC Driver 12c
• Same connection will be used for the life of an XA transaction.
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Agenda
• Active GridLink for RAC
• Summary – Oracle WLS Integration with Oracle Database 12c
• Application Continuity and Transaction Guard
• Database Resident Connection Pools
• Pluggable Database
• Auto ONS
• Global Data Services
Oracle Confidential – Internal/Restricted/Highly Restricted 24
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Pluggable Database – In-Database Virtualization
• Typical database configurations
– Small to medium size databases that each support a separate application
– Business databases in which each module of an application uses a separate database
– Multi tenant databases with multiple copies of the same database (one per tenant)
– Multiple tenant databases with different collections of schemas to support separate tenants
• Pluggable Database implementations allow multiple distinct databases in a single larger database installation
• The Container Database (CDB) feature in Oracle Database 12c minimizes the overhead of multi-database configurations by consolidating them into a single database with multiple Pluggable Databases (PDB).
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Pluggable Database – Benefits
• The ability to upgrade Oracle Database transparently to later versions within the context of a single Container Database
• The ability to run multiple versions of Oracle Database (tenant DBs) inside of a Container
• More efficient use of hardware resources
• Unified security management
• Greater density and scalability in the middle and data tiers, leading to better resource utilization
• Support for multiple tenants in a single database
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Pluggable Database – Integration
• Client connection
– Verify availability of and privileges for PDB (ALTER SESSION SET CONTAINER)
• PDB service (default, custom) provides context attribute for application‘s database session
• WebLogic Server best practice: register callback
– Changes the connection with the ALTER SESSION SET CONTAINER
– Labels the connection
– For first-time connection and switching between PDBs
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Pluggable Database – WLS Topologies
• A single data source to pool connections to multiple pluggable databases – scalable, elastic.
• A single data source per PDB, effectively multi-tenancy. If a new PDB is added to the CDB a new data source needs to be configured in WebLogic Server.
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Agenda
• Active GridLink for RAC
• Summary – Oracle WLS Integration with Oracle Database 12c
• Application Continuity and Transaction Guard
• Database Resident Connection Pools
• Pluggable Database
• Auto ONS
• Global Data Services
Oracle Confidential – Internal/Restricted/Highly Restricted 29
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Auto ONS (Oracle Notification Service)
• 11g Active GridLink: need to configure an ONS listener list when FAN is enabled
• 12c: ONS list is optional
– The information is automatically provided from the database to the driver
• Auto ONS is for
– Oracle Database 12c RAC with JDBC 12c driver
– New Global Database Service (GDS) feature
– (Not for single instance database)
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Agenda
• Active GridLink for RAC
• Summary – Oracle WLS Integration with Oracle Database 12c
• Application Continuity and Transaction Guard
• Database Resident Connection Pools
• Pluggable Database
• Auto ONS
• Global Data Services
Oracle Confidential – Internal/Restricted/Highly Restricted 31
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
GDS – Database Services on a Global Scale
• Key to deploying databases in a large cloud architecture
• Failover and load balancing within & across data centers
• RAC and single instance databases inter-connected by replication technology
– Oracle Data Guard
– GoldenGate
• Transparent client access to the distributed infrastructure
• Straightforward connection configuration for WLS admin, denoting – Service name (Global Service Name)
– Address/port pairs (for various Global Service Managers)
– GDS Region (new)
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
GDS – Features & Benefits • Central management of database services across a
distributed database cloud
• Dynamic migration of services based on load and availability
• Scalability by adding RAC clusters
• Automatic restart of failed services on an available database
• Easy integration with Oracle WebLogic Server via the Active GridLink data source
• GDS region re-connection upon connection loss via Fast Application Notification (FAN) events
– Business continuity: no need to restart mid-tier components on failure
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Agenda
• Demo: Application Continuity in WLS
Oracle Confidential – Internal/Restricted/Highly Restricted 34
• http://www.youtube.com/watch?v=qKL9I_2sX_w
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Oracle Confidential – Internal/Restricted/Highly Restricted 36
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Active GridLink and Data Guard
Oracle Confidential – Internal/Restricted/Highly Restricted 37
Primary Datacenter
Standby Datacenter
1Gb Corporate Network 1Gb Corporate Network
Oracle Real App Cluster DB Oracle Real App Cluster DB
Oracle Data Guard over Ethernet
Storage
Binaries Configuration File based data
WAN
Storage
Binaries Configuration File based data Sun Storage Replication over Ethernet
Local Load Balancer Local Load Balancer