Read-intensive applications running in Kubernetes can benefit from a cache close to the application tier, particularly when network latency to the primary database affects response times. Oracle True Cache can serve these reads while reducing read traffic to the primary database.

The new guide, Deploying Oracle True Cache on Kubernetes with an Oracle RAC Database Primary, walks through deploying True Cache in Oracle Kubernetes Engine (OKE) using Oracle Database Operator for Kubernetes. The architecture places the application and True Cache in the same Kubernetes cluster, with an Oracle Real Application Clusters (Oracle RAC) primary database running outside the cluster.

The guide covers OCI networking and private DNS configuration, True Cache deployment and validation, and application configuration for directing read-only traffic to True Cache.

Figure 1. Oracle Kubernetes Engine (OKE) cluster, Oracle True Cache running in the same Kubernetes cluster as the application 
Figure 1. Oracle Kubernetes Engine (OKE) cluster, Oracle True Cache running in the same Kubernetes cluster as the application 

Solution Highlights

  • Production-style architecture: An Oracle RAC database runs outside the Kubernetes cluster, while the application and Oracle True Cache run together in Oracle Kubernetes Engine (OKE). Collocating True Cache in the application’s Kubernetes cluster provides multiple practical benefits:
    • Performance: True Cache reduces read latency and offloads read traffic from the primary database. See an example of the response time improvements for some of the sample workloads tested in Figure 2.
    • One operations platform: You can manage the True Cache container alongside the application with your existing deployment, monitoring, secrets, and network policies. True Cache benefits from the lifecycle simplifications provided by Kubernetes (mobility, backup, scalability, disaster protection …).
    • Fine Control of placement and resource isolation: You can use dedicated worker nodes and placement rules to keep True Cache near the application while using Kubernetes’ resource allocation to control the CPU and memory allocated to it.
  • Secure/Tiered OCI networking: The guide provides a secure setup with separate subnets for the database, OKE worker nodes, and Kubernetes services, and explains the network rules needed for appropriate communication between them.
  • Operator-managed deployment: Oracle Database Operator for Kubernetes uses declarative Kubernetes resources to deploy and configure True Cache and its related resources.
    • The operator makes True Cache provisioning and recreation easier and more repeatable.
    • The operator automates the provision of a private OCI Network Load Balancer (NLB) to expose the True Cache listener to the primary database.
    • The operator uses ExternalDNS feature to register the True Cache hostname in OCI private DNS and map it to the NLB address, so the primary database can resolve and reach True Cache.
Read response times (ms) for queries sent to the primary database (blue) versus reads served by a local True Cache (red), for a test with a 10 ms round-trip time (RTT) between the primary database and the application tier.
Figure 2. Read response times (ms) for reads sent to the primary database (blue) versus reads served by a local True Cache (red), for a test with a 10 ms round-trip time (RTT) between the primary database and the application tier.

Ready to deploy True Cache alongside your Kubernetes applications? Follow Deploying Oracle True Cache on Kubernetes with an Oracle RAC Database Primary for networking, deployment, validation, and application configuration instructions.

Intended Audience 

This document is intended for mid-tier administrators, Oracle DBAs, system architects, and IT professionals responsible for designing, implementing, and managing solutions for middleware applications. Organizations looking to improve their mid-tier performance and offload read traffic from the primary database will find this guidance helpful.