Share Your Performance Tips

It should be as easy as:

const RedisCacheAdapter  = require('parse-server').RedisCacheAdapter 
// in Parse Server config
cacheAdapter: new RedisCacheAdapter({ url: REDIS_URL }),
1 Like

@dblythy Thanks for the reminder to use redis, just to clarify your example:

What exactly happens when the redis cache is not used?

If instance A has user in memory cache, and instance B receives a new request, it will hit the database to fill its own in memory cache, modify and save the object. And instance A will have an outdated copy in its in memory cache. Correct?

Which means that if you have a workload that potentially modifies the same object from multiple places, chances are that without redis different instances will fill their own in memory cache with different versions of database backing object, applying their changes, and potentially returning partially invalid data to clients, or even overwriting changes on the same object?

is my understanding correct?
Martin

Do we have this documented somewhere? I have questions like:

  • How frequently is in-memory cache actualised with objects from the backing mongo? (if ever)?
  • What can happen if redis is not used (as outlined above)?
  • What types of workloads are acceptable without redis?