O'Reilly logo
live online training icon Live Online training

Microservices caching strategies

Leveraging caching in a microservices ecosystem

Topic: Web & Mobile
Mark Richards

In this 1-day online class expert software architect Mark Richards describes and demonstrates various caching strategies and patterns that you can use in Microservices to significantly increase performance, manage common data in a highly distributed architecture, and even manage data synchronization from cloud-based microservices. He describes the differences between a distributed and replicated cache, and demonstrates how to do space-based microservices, leveraging caching to its fullest extent.

What you'll learn-and how you can apply it

By the end of this live, hands-on, online course, you’ll understand:

  • The differences between distributed and replicated cachin
  • How data is replicated between microservices
  • How to synchronize a replicated cache with an externally updated database
  • How to maintain a bounded context with a shared database
  • What the primary differences are between major caching technologies (products)
  • Alternatives for doing reporting and analytics in a highly-distributed microservices ecosystem

And you’ll be able to:

  • Perform cloud-based data synchronization between cloud and on-prem systems
  • Increase the performance of your microservices architecture
  • Share a single database schema within your microservices ecosystem
  • Do effective large-scale reporting and analytics in the microservices architecture
  • Version breaking database changes
  • Select the right caching technology that's right for you

This training course is for you because...

  • You are using microservices but cannot break apart your monolithic database
  • You need to synchronize data between cloud and on-prem systems
  • You need to increase the performance of your microservices architecture
  • You need cross-cutting reporting and analytics capabilities in your microservices ecosystem


  • A basic understanding of the Microservices architecture style and some of the issues associated with Microservices is needed as this class does not cover the basics of Microservices.
  • The desire to learn more about the complexities of Microservices

Recommended preparation:

Recommended follow-up:

About your instructor

  • Mark Richards is an experienced hands-on software architect involved in the architecture, design, and implementation of microservices architectures, service-oriented architectures, and distributed systems. He's been in the software industry since 1983 and has significant experience and expertise in application, integration, and enterprise architecture. He's the author of numerous O’Reilly technical books and videos, including several books on microservices, the Software Architecture Fundamentals video series, the Enterprise Messaging video series, and Java Message Service, second edition, and was a contributing author to 97 Things Every Software Architect Should Know. A speaker and trainer, he’s given talks on a variety of enterprise-related technical topics at hundreds of conferences and user groups around the world.


The timeframes are only estimates and may vary according to how the class is progressing

Caching Topologies (45 min)

  • Single In-Memory Caching
  • Distributed Caching
  • Replicated Caching
  • Near-Cache Hybrid
  • Which One Should I Use?
  • Break (10 min)

Caching Use Cases (30 min)

  • Data Sharing
  • CQRS

Space-Based Microservices (45 min)

  • Topology Overview
  • Data Pumps
  • Leveraging caching to increase performance
  • Sharing the same database within a Microservices ecosystem
  • Synchronizing cloud and on-prem systems
  • Versioning database changes
  • Reporting and analytics within Microservices
  • Break (10 min)

Error Handling (20 min)

  • Preventing Data Loss

Cache Eviction Techniques (40 min)

  • Time-To-Live (TTL) Policy
  • Archive (ARC) Policy
  • Least Frequently Used (LFU) Policy
  • Least Recently Used (LRU) Policy
  • Random Replacement (RR) Policy