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
-
Identify the Function
- Go to OCI Console → Developer Services → Functions → Applications
- Select the function used for AES encrypt/decrypt.
-
Check Current Behavior
- Invoke the function from OIC after idle time.
- Observe latency in the first response.
-
Enable Provisioned Concurrency
- Navigate to the function details page.
- Select Concurrency → Provisioned Concurrency.
- Set the number of provisioned instances (e.g.,
1
or2
, depending on expected workload).
-
Save and Deploy
- Apply the configuration.
- OCI will now keep those function instances warm.
-
Validate from OIC
- Re-test the function invocation from OIC.
- First call latency should now be drastically reduced.
-
Optimize Costs
- Start with minimal provisioned concurrency (e.g.,
1
) - Monitor usage and increase only if high parallelism is required.
- Start with minimal provisioned concurrency (e.g.,
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