Tuesday, September 23, 2025

OIC - Solving Cold Start Latency in OCI Functions (AES Encryption/Decryption via OIC)

Use Case

In an integration scenario, we have an OCI Function that performs AES encryption and decryption.
This function is invoked from Oracle Integration Cloud (OIC) as part of secure data exchange.

However, we observed a performance bottleneck:

  • When the function is invoked after being idle for a long time, the first request takes significantly longer to respond.
  • Subsequent requests perform normally.
  • This is the classic cold start issue with serverless functions.

For business-critical integrations where response time is crucial (e.g., encrypting/decrypting sensitive payloads on-the-fly), this latency is unacceptable.

Solution: Provisioned Concurrency in OCI Functions

To eliminate cold starts and improve response consistency, we configure Provisioned Concurrency for the function.
Provisioned concurrency ensures that a set number of function instances are kept warm and ready, drastically reducing the cold start delay.


Step-by-Step Solution

  1. Identify the Function

    • Go to OCI Console → Developer Services → Functions → Applications
    • Select the function used for AES encrypt/decrypt.
  2. Check Current Behavior

    • Invoke the function from OIC after idle time.
    • Observe latency in the first response.
  3. Enable Provisioned Concurrency

    • Navigate to the function details page.
    • Select Concurrency → Provisioned Concurrency.
    • Set the number of provisioned instances (e.g., 1 or 2, depending on expected workload).
  4. Save and Deploy

    • Apply the configuration.
    • OCI will now keep those function instances warm.
  5. Validate from OIC

    • Re-test the function invocation from OIC.
    • First call latency should now be drastically reduced.
  6. Optimize Costs

    • Start with minimal provisioned concurrency (e.g., 1)
    • Monitor usage and increase only if high parallelism is required.

Key Benefits

No cold start delays – consistent response time for AES operations
Improved user experience – faster integration performance
Scalable – adjust provisioned concurrency as per demand
Secure – AES encryption/decryption handled in isolated OCI Function environment


👉 This setup ensures reliable, low-latency cryptographic operations for sensitive data processing in OIC integrations.


Reference:

https://docs.oracle.com/en-us/iaas/Content/Functions/Tasks/functionsusingprovisionedconcurrency.htm

No comments:

Post a Comment

Featured Post

OIC - Monitoring Oracle CCS Batch Job Failures in Real-Time with OIC and Datadog

Use Case In Oracle Integration Cloud (OIC), batch jobs are frequently triggered in Oracle Customer Cloud Service (CCS) to handle customer d...