Optimized queries to reduce costs in microservice applications
Command Query Responsibility Segregation (CQRS) is a pattern within microservice architectures that decouples reads (queries) from writes (commands). This enables an application to optimize database writes to a slower disk-based SQL database, while pre-fetching and caching that data using Redis Enterprise’s integrated Change Data Capture (CDC) capability for read-optimized querying. Doing so enables the data to be shared with other microservices without breaking isolation and coupling their deployments.
|The problem||The Redis Enterprise solution|
|Accessing data across domains creates too many dependencies|| Maintain isolation among microservices by creating a separate read-only cache to serve data to different services.|
Segregate the read and write data stores to create maintainable and flexible application models.
|Cannot optimize for both writes (durability and consistency) and reads (real-time queries)|| Use a simple read optimize schema for the query cache; employ a write optimized schema for the system of record. that requires persistent updates and complex business logic.|
Store a materialized view of the data to avoid complex joins or mappings during data access.
|Excessive reads cause performance penalties and higher infrastructure costs|| Minimize infrastructure requirements and mainframe MIPS by offloading read processing to a cache, enabling fast queries and reducing the burden on the system of record.|
Rely on Redis Enterprise support for multiple data structures, with easy scalability to deliver millions of operations per second throughput at <1ms latency.
|Developing code for syncing data increases complexity and OpEx cost||Why build your own? Use Redis Enterprise’s Integrated CDC instead of implementing a separate syncing solution and the associated costs of doing so.|
Real-Time Inventory Management
By continuing to use this site, you consent to our updated privacy agreement. You can change your cookie settings at any time but parts of our site will not function correctly without them.