Search code examples
deepstream.io

database Vs cache management in deepstream


I was wondering about how deepstream decides to store an info in cache vs database if both of them are configured. Can this be decided by the clients?

Also, when using redis will it provide both cache and database functionality? I would be using amazon elastic cache with redis backend for the same.


Solution

  • It stores it in both, first in the cache in a blocking way and outside the critical path in the database in a non-blocking way.

    Here's an animation illustrating this.

    deepstream data flow

    You can also find more information here: https://deepstream.io/tutorials/core/storing-data/