Microsoft Certified: Azure Developer Associate (AZ-204)Monitor, troubleshoot, and optimize Azure solutionsMedium

You are developing a new microservice that relies on a backend data store. To improve response times and reduce the load on the database, you decide to implement a distributed cache. The cache needs to support high availability, scale out independently, and allow data to be shared across multiple instances of your microservice. Which Azure caching solution best meets these requirements?

  1. AAzure Cache for Redis
  2. BAzure Storage Table
  3. CIn-memory cache within each microservice instance
  4. DAzure SQL Database with 'MEMORY_OPTIMIZED_DATA' tables
Show answer & explanation

Correct answer: A. Azure Cache for Redis

Azure Cache for Redis is a highly scalable, secure, and performant distributed cache. It natively supports high availability, can scale out independently, and is designed for sharing data across multiple application instances, making it ideal for microservice architectures.

Why the other options are wrong

  • B. Azure Storage Table is a NoSQL data store, not primarily designed as a high-performance, low-latency cache, and lacks native caching features like eviction policies.
  • C. In-memory cache is local to each instance and does not allow data sharing across multiple microservice instances, nor does it provide high availability.
  • D. MEMORY_OPTIMIZED_DATA tables in Azure SQL Database are for improving SQL query performance, not for acting as a separate, distributed cache layer for microservices.

Azure Cache for Redis

A fully managed, in-memory data store service based on the open-source Redis. It offers high performance, scalability, and availability for caching and session management.

  • Open-source Redis compatible.
  • Supports various data structures.
  • Provides high throughput and low latency.

Memory trick: For shared fast data, Redis is the cache that rates.

More Monitor, troubleshoot, and optimize Azure solutions questions