Best Practices for Low Latency Connections with Autonomous Database

Taking steps to reduce the latency for connections between an application and Autonomous Database is critical if your application performs many round-trips between the application and the database.

For example, consider an OLTP application connecting to Autonomous Database and submitting thousands of SQL statements to the database individually to execute a sales order. In this case, the application requires thousands of round-trips, and reducing the latency for each round-trip can considerably speed up the sales order process. For such applications there are best practices that you can follow to reduce the latency for database connections.

Steps to Reduce Latency for Database Connections

You can follow these recommendations to reduce the latency for connections between your applications and the database.

First determine the database's availability domain. To find an Autonomous Database instance's availability domain, connect as ADMIN and run the following query:

SELECT json_value(cloud_identity, '$.AVAILABILITY_DOMAIN') AVAILABILITY_DOMAIN FROM v$pdbs;

For example:

SELECT json_value(cloud_identity, '$.AVAILABILITY_DOMAIN') AVAILABILITY_DOMAIN
             FROM v$pdbs;

AVAILABILITY_DOMAIN  
-------------------- 
SoSC:US-ASHBURN-AD-1

To reduce latency, do the following:

  1. Place clients or the mid-tier servers in the same availability domain as the Autonomous Database instance.

    For example, if your application runs on an Oracle Cloud Infrastructure Compute VM, select the same availability domain as the Autonomous Database instance when you create the compute instance.

    If the application runs in another cloud or in an on-premises data center, use OCI FastConnect to reduce the latency for the connection to your OCI region. See FastConnect Overview for more information.

  2. Configure the network routing.
    • If you are using an Autonomous Database instance on a public endpoint, configure your network routing so that the connection from the client to the database goes through a Service Gateway.

      See the following for more information.

    • If you are using an Autonomous Database instance on a private endpoint, you connect to the database using the private endpoint visible in your network, without the need to configure a Service Gateway.

  3. Use one-way TLS connections without a wallet.

    As a best practice for lower latency, configure the Autonomous Database instance to allow both mTLS and TLS connections and use TLS connections to connect your application to the database.

    See the following for more information:

Conceptual Network Diagram for Low Latency Database Connections

Shows the conceptual network diagram for low latency connections using public endpoints and private endpoints for your database.

Low Latency Connections Using Private Endpoint with Application Running Inside the OCI Region

Description of adb-private-low-latency.eps follows

Low Latency Connections Using Public Endpoint with Application Running Inside the OCI Region

Description of adb-public-low-latency.eps follows

Low Latency Connections Using a Private Endpoint with Application Running In On-Premises Data Center Connected to OCI Using FastConnect

Description of adb-fastconnect-private-low-latency.eps follows

Low Latency Connections Using a Private Endpoint with Application Running In Your in On-Premises Data Center Connected to OCI Using FastConnect

Description of adb-fastconnect-public-low-latency.eps follows