When are read replicas preferable over ElastiCache for RDS?

If it is repetitive queries, we go for ElastiCache over read replicas, so that it’s cheaper. However, what are the cases when we would choose read replicas over ElastiCache even if they’re more expensive?

Because ElastiCache can be Multi-AZ as well.

Extremely App dependent. If you need real time data caching won’t work as you’ll be invalidating it as much as caching it.

Which types of apps would prefer to use ElastiCache vs Read Replicas? and to solve the cache invalidation problem, perhaps they can increase the TTL?

Lets say you have static data like country, cities names tables which will not change for long time, put those data in elasticache.

Let’s say there are transactions or any kind of dynamic data, have a read replica to offload the dynamic data in replica d and in such case the main db is put less load and the replica db can provide the latest dynamic data.

Thank you for this, this makes it clear

Read replicas are good for example for reports doing aggregation over all data - they’re usually slow queries, but don’t really care about data being perfectly up to date. If you have operations like those, you run them against the read replica and don’t impact primary DB performance.

Though main benefits of the replicas are the resilience and being able to reconfigure cluser without downtime.

In Aurora clusters, read replicas are important for quick failover if the writer instance fails unexpectedly. In classic RDS, “Multi-AZ” mode is just a managed read replica under the hood.

ETL is a good case, if you are doing large queries that will add locks or simply tax the database beyond what your SLA is you would benefit from running those queries in an instance that’s not in the end-user’s request loop

They are for different use cases

Read replicas are most useful for the Extract and Transform steps of ETL pipelines, since those likely have compute heavy queries that are read only operations. Read replicas are also very useful if you need to run analytical queries, for similar reasons.

ElastiCache is most useful for API calls where the response rarely changes. An especially potent example is if it is an API call querying data that is only ever updated by ETL.

This probably isn’t every useful situation but these are definitely the ideal and textbook use-cases.