Understanding oracle rac internals part 2 - slides

download Understanding oracle rac internals   part 2 - slides

of 54

  • date post

    18-Jul-2015
  • Category

    Technology

  • view

    54
  • download

    5

Embed Size (px)

Transcript of Understanding oracle rac internals part 2 - slides

  • 1 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

  • 2 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Understanding Oracle RAC Internals Part 2 for the Oracle RAC SIG

    Markus Michalewicz (Markus.Michalewicz@oracle.com)

    Senior Principal Product Manager Oracle RAC and Oracle RAC One Node

  • 3 Copyright 2011, 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 Oracles products remains at the sole discretion of Oracle.

  • 4 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Agenda

    Client Connectivity

    Node Membership

    The Interconnect

  • 5 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Client Connectivity Direct or indirect connect

    Production

    Email

    BATCH

    Connect Time Load Balancing (CTLB)

    Connect Time Connection Failover (CTCF)

    Runtime Connection Load Balancing (RTLB)

    Runtime Connection Failover (RTCF)

    Connection

    Pool

    SC

    AN

  • 6 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Client Connectivity Connect Time Connection Failover

    jdbc:oracle:thin:@MySCAN:1521/Email

    PMRAC =

    (DESCRIPTION =

    (FAILOVER=ON)

    (ADDRESS = (PROTOCOL = TCP)(HOST = MySCAN)(PORT = 1521))

    (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = Email)))

    Production Email

    BATCH

    Connection

    Pool

    MyS

    CA

    N

  • 7 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Client Connectivity Runtime Time Connection Failover

    Production Email

    BATCH

    Connection

    Pool

    MyS

    CA

    N

    PMRAC =

    (DESCRIPTION =

    (FAILOVER=ON)

    (ADDRESS = (PROTOCOL = TCP)(HOST = MySCAN)(PORT = 1521))

    (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = Email)

    ...))

  • 8 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Client Connectivity Runtime Time Connection Failover

    Production Email

    BATCH

    Connection

    Pool

    MyS

    CA

    N

    PMRAC =

    (DESCRIPTION =

    (FAILOVER=ON)

    (ADDRESS = (PROTOCOL = TCP)(HOST = MySCAN)(PORT = 1521))

    (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = Email)

    (FAILOVER_MODE= (TYPE=select)(METHOD=basic)(RETRIES=180)(DELAY=5))))

    ?

  • 9 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Client Connectivity More information

    Production Email

    BATCH

    Connection

    Pool

    MyS

    CA

    N

    ? ? ?

    If problems occur, see:

    Note 975457.1 How to Troubleshoot Connectivity Issues with 11gR2 SCAN Name

    For more advanced configurations, see:

    Note 1306927.1 Using the TNS_ADMIN variable and changing the default port number of all Listeners in an 11.2 RAC for an 11.2, 11.1, and 10.2 Database

  • 10 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Client Connectivity Two ways to protect the client

    Production Email

    BATCH

    Connection

    Pool

    MyS

    CA

    N

    1. Transparent Application Failover (TAF) Tries to make the client unaware of a failure

    Provides means of CTCF and RTCF

    Allows for pure selects (reads) to continue

    Write transactions need to be re-issued

    The Application needs to be TAF aware

    2. Fast Application Notification (FAN) FAN wants to inform clients ASAP

    Client can react to failure asap

    Expects clients to re-connect on failure (FCF)

    Sends messages about changes in the cluster

    ?

  • 11 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Client Connectivity and Service Definition Define settings on the server

    Production Email

    BATCH

    MyS

    CA

    N

    [GRID]> srvctl config service

    -d ORCL -s MyService

    Service name: MyService

    ...

    DTP transaction: false

    AQ HA notifications: false

    Failover type: NONE

    Failover method: NONE

    TAF failover retries: 0

    TAF failover delay: 0

    Connection Load Balancing Goal: LONG

    Runtime Load Balancing Goal: NONE

    TAF policy specification: BASIC

    HA (and LB) settings

    can be defined per service

    Clients connecting to the service will

    adhere to the settings considering the

    client used.

  • 12 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Client Connectivity Use a FAN aware connection pool

    Production Email

    BATCH Connection Pool

    MyS

    CA

    N

    If a connection pool is used The clients (users) get a physical

    connection to the connection pool

    The connection pool creates a physical connection to the database

    It is a direct client to the database

    Internally the pool maintains logical connections

    1

  • 13 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Client Connectivity Use a FAN aware connection pool

    Production Email

    BATCH Connection Pool

    MyS

    CA

    N

    The connection pool Invalidates connections to one instance

    Re-establishes new logical connections

    May create new physical connections

    Prevent new clients to be misrouted

    The application needs to handle the transaction failure that might have occurred.

    2

  • 14 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Client Connectivity The Load Balancing (LB) cases Connect Time Load Balancing (CTLB)

    Runtime Connection Load Balancing (RTLB)

    On the Client Side

    On the Server Side

    Production

    Email

    BATCH

    Connection

    Pool MyS

    CA

    N

  • 15 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Client Connectivity Connect Time Load Balancing (CTLB) on the client side

    Production Email

    BATCH

    Connection

    Pool

    MyS

    CA

    N

    PMRAC =

    (DESCRIPTION =

    (FAILOVER=ON)(LOAD_BALANCE=ON)

    (ADDRESS = (PROTOCOL = TCP)(HOST = MySCAN)(PORT = 1521))

    (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = Email)))

  • 16 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Client Connectivity Connect Time Load Balancing (CTLB) on the server side

    Production Email

    BATCH

    Connection

    Pool

    MyS

    CA

    N

    ?

    Traditionally, PMON dynamically registers the services to the specified listeners with:

    Service names for each running instance of the database and instance names for the DB

    The listener is updated with the load information for every instance and node as follows:

    1-Minute OS Node Load Average all 30 secs.

    Number of Connections to Each Instance

    Number of Connections to Each Dispatcher

  • 17 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Client Connectivity Use FAN for the Load Balancing cases Connect Time Load Balancing (CTLB)

    Connect Time Connection Failover (CTCF)

    Runtime Connection Load Balancing (RTLB)

    Runtime Connection Failover (RTCF)

    RAC

    Database

    Instance1

    Instance2

    Instance3

    Im busy

    Im very busy

    Im idle

    30% connections

    10% connections

    60% connections

  • 18 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Client Connectivity Use FAN for the Load Balancing cases Connect Time Load Balancing (CTLB)

    Runtime Connection Load Balancing (RTLB)

    Also via AQ (Advanced Queuing) based notifications

    Background is always the Load Balancing Advisory

    For more information, see:

    Oracle Real Application Clusters Administration and Deployment Guide 11g Release 2: 5 Introduction to Automatic Workload Management

    RAC

    Database

    Instance1

    Instance2

    Instance3

    Im busy

    Im very busy

    Im idle

    30% connections

    10% connections

    60% connections

    MyS

    CA

    N

  • 19 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Node Membership

  • 20 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    The Oracle RAC Architecture Oracle Grid Infrastructure 11g Release 2 process overview

    OS OS

    Oracle Grid Infrastructure

    Node Membership

    HA Framework

    ASM Instance

    OS My Oracle Support (MOS)

    Note 1053147.1 - 11gR2 Clusterware and Grid Home - What You Need to Know

    Note 1050908.1 - How to Troubleshoot Grid Infrastructure Startup Issues

  • 21 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Oracle Clusterware Architecture Node Membership Processes and Basics

    SAN

    Network SAN

    Network

    Public Lan Public Lan

    CSSD CSSD CSSD

    Voting