1Z0-997-25 Question 96
Single answerYou are running a distributed e-commerce application on Oracle Cloud Infrastructure (OCI) that relies heavily on real-time product data. The application currently retrieves this data directly from an Autonomous Database for each request, causing response times to spike under heavy load. You want to integrate OCI Cache to handle frequently accessed product details while ensuring the database and cache remain in sync when product data changes. Which approach would best optimize performance and maintain data consistency?
- A
A) Configure each microservice to store product details in a local in-process cache without any synchronization mechanism.
- B
B) Deploy a single OCI Cache cluster shared by all microservices and implement a short time-to-live (TTL) strategy for product data.
- C
C) Set up OCI Cache nodes in each Availability Domain but keep TTL disabled to avoid invalidations.
- D
D) Implement periodic bulk cache flushes across all OCI Cache nodes whenever any product data is updated in the database.
Show answer and explanation
Correct answer: B
Explanation
Using a shared OCI Cache cluster with a time-to-live or similar invalidation approach ensures that frequently accessed product data is served quickly from memory, reducing load on the Autonomous Database. When product data changes, either a short TTL or a targeted invalidation mechanism ensures the cache remains consistent without a complete flush. Refer to 'Caching Strategies and Best Practices' in the Oracle Cloud Infrastructure documentation for additional guidance on cache clustering and invalidation techniques.
- A. Incorrect.
A) Incorrect. Storing data only in local process memory without synchronization leads to data inconsistencies across instances and lacks a scalable approach for high-traffic scenarios.
- B. Correct.
B) Correct. A shared OCI Cache cluster that uses a short TTL (or a similar invalidation strategy) ensures high performance while preserving consistency. Frequently accessed data can be retrieved quickly, and updates to product data will eventually invalidate the cached entries without requiring a manual global flush.
- C. Incorrect.
C) Incorrect. Deploying cache nodes in multiple Availability Domains is good for high availability, but disabling TTL means stale data may never be invalidated automatically, harming accuracy and consistency.
- D. Incorrect.
D) Incorrect. Flushing the entire cache periodically can cause performance dips (cache misses) after each flush and is inefficient compared to a more granular invalidation strategy.