Network Config   «Prev  Next»

Lesson 5Connection concentration with CMAN
ObjectiveUse CMAN’s connection concentration Feature

Connection concentration for 'cloud-enabled' databases

Yes, the concept of connection concentration is still relevant and used in Oracle "cloud-enabled databases", including modern deployments involving Oracle Connection Manager (CMAN) and Oracle's cloud offerings. It plays a crucial role in managing database connections effectively in environments where a large number of clients need to connect to the database concurrently.
What is Connection Concentration? Connection concentration refers to the ability of Oracle Connection Manager (CMAN) to reduce the number of physical connections to the database by multiplexing multiple client connections over a smaller number of network sessions. This is particularly useful in scenarios where:
  • There are many clients connecting simultaneously.
  • Each client has low or intermittent usage of the database.

By using connection concentration:
  • Resource Utilization: It minimizes the overhead of maintaining individual network sessions for each client.
  • Scalability: The database server handles fewer active network sessions, improving scalability and performance.
  • Efficiency: The connection pool on the CMAN server optimizes session reuse and reduces the workload on the database server.

Relevance to Oracle Cloud-Enabled Databases
In Oracle's cloud-enabled databases (such as Oracle Autonomous Database, Oracle Database on Oracle Cloud Infrastructure), connection concentration remains an essential feature for handling:
  1. High-concurrency workloads: Applications with thousands of users, such as SaaS applications, benefit from the reduced physical session requirements on the database.
  2. Network optimization: In cloud environments, network resources are often metered, so reducing the number of active connections optimizes network utilization.
  3. Multi-tenancy: For cloud services hosting multiple tenants (e.g., applications serving multiple customers), connection concentration helps isolate client sessions without overburdening the database server.

How is CMAN Configured for Connection Concentration?
In cloud or on-premises environments, connection concentration is typically achieved by:
  • Configuring the cman.ora file to enable session multiplexing. This involves defining CMAN_RULES and setting appropriate parameters like MAX_CONNECTIONS and MAX_SESSIONS.
  • Enabling connection pooling and session multiplexing options in CMAN.
  • Using TNSNAMES.ORA or Oracle Net Manager to route connections through CMAN.

Example of relevant `cman.ora` configuration:
CMAN =
  (CONFIGURATION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = your-cman-host)(PORT = your-cman-port))
    (RULE_LIST =
      (RULE =
        (SRC = *)
        (DST = your-database-host)
        (SRV = *)
        (ACT = allow)
        (CONNECTION_METHOD = multiplex)
      )
    )
    (MAX_CONNECTIONS = 1000)
    (MAX_SESSIONS = 500)
  )


Benefits in Oracle Cloud Context
  • Efficient Scaling: Especially critical in Oracle Autonomous Database or Exadata cloud deployments where dynamic scaling is common.
  • Improved Cost Management: Reduced session overhead translates to better cost efficiency in metered cloud environments.
  • Simplified Database Management: Centralized session control via CMAN allows administrators to better manage session-based policies.

In conclusion, connection concentration remains a key feature for optimizing Oracle database environments, both in traditional on-premises settings and in modern cloud-enabled databases. It helps ensure efficient utilization of resources, scalability, and enhanced performance.
To use CMAN’s connection concentration feature you must perform two tasks:
  1. Verify that the destination server is configured as a Multi-Threaded SharedServer and verify that the multiplexing feature is turned on. You can turn it on by setting the mts_dispathers parameter in each database’s init.ora file. The entry would be:
    MTS_DISPATCHERS = (PROTOCOL=TCP) (MULTIPLEXING=ON)
    
  2. Route all client connection requests you want concentrated to the database server through the Connection Manager. This step is accomplished by using the Net8 Assistant on the client. From Net8 Assistant choose Profile from the Network menu, then choose the General tab.

Routing Client Connection Requests to the Connection Pool

In the client application, the connect string must specify the connect type as POOLED. The following example shows an easy connect string that enables clients to connect to a database resident connection pool:
oraclehost.company.com:1521/books.company.com:POOLED

The following example shows a TNS connect descriptor that enables clients to connect to a database resident connection pool:
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp) (HOST=myhost)
(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=sales)
(SERVER=POOLED)))

listener: A process that resides on the server whose responsibility is to listen for incoming client connection requests and manage the traffic to the server. Every time a client requests a network session with a server, a listener receives the actual request. If the client information matches the listener information, then the listener grants a connection to the server.

Connection Concentration in an Oracle 11g R2 environment:

To use Connection Manager (CMAN)'s connection concentration feature in Oracle 11g R2, you must perform the following tasks:
  1. Verify Multi-Threaded Shared Server Configuration:
    • Ensure that the destination database server is configured as a Multi-Threaded Shared Server.
    • Set the DISPATCHERS parameter in the database’s init.ora or spfile file to enable multiplexing. For example:
    • DISPATCHERS = '(PROTOCOL=TCP)(DISPATCHERS=2)(MULTIPLEX=ON)'
            
    • The MULTIPLEX keyword enables connection multiplexing, allowing the Connection Manager to aggregate multiple client connections over a single network connection to the database server.
  2. Route Client Connection Requests Through Connection Manager:
    • Configure the clients to route their connection requests through the Connection Manager.
    • This can be achieved by editing the tnsnames.ora file on the client side to include the Connection Manager’s address in the connection path. An example configuration in tnsnames.ora:
    • CONCENTRATED_DB =
        (DESCRIPTION =
          (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = TCP)(HOST = cman_host)(PORT = 1521))
          )
          (CONNECT_DATA =
            (SERVICE_NAME = target_db)
          )
        )
            
  3. Using Oracle Net Manager:
    • Open Oracle Net Manager on the client machine.
    • Navigate to the Profile section under the Network menu.
    • In the General tab, configure the client to route through the Connection Manager.
By performing these steps, you can enable connection concentration, optimizing network resources and improving scalability in Oracle 11g R2.

In the next lesson you will learn how to configure the Connection Manager to control access to your database server.
SEMrush Software Target 5SEMrush Software Banner 5