Using Redis then dump data is just great

(Quenten) #1

Discourse is using Redis to store live data, and dumps this data periodically to the database.
This is such a great idea, It makes scalability very easy and cheap.
I want to learn more about this architecture, does it have a special name ? So I can go with my searching forward.

Thank you.

(Jeff Atwood) #2

No, that is not what we do, Postgres is used for the DB and Redis is used as an in memory and cross server cache.

(Quenten) #3

So, for example, when I like your comment, do I hit the database directly ? Jeff ? @codinghorror

(Régis Hanol) #4

Yes it does.

You should read the source code to learn more about how Discourse works :wink:

(Quenten) #5

Sorry I’m not very good with Ruby, can you point the class or the method that does this ?
Thank you.