# Using Redis then dump data is just great

**URL:** https://meta.discourse.org/t/using-redis-then-dump-data-is-just-great/42431
**Category:** Development
**Created:** [2016 年 4 月 12 日午前 7:28 UTC](https://meta.discourse.org/t/using-redis-then-dump-data-is-just-great/42431 "2016-04-12T07:28:49Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Aymane\_Shuichi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aymane_shuichi/32/63024_2.png) [@Aymane\_Shuichi](https://meta.discourse.org/u/Aymane_Shuichi)
#### Post date: [2016 年 4 月 12 日午前 7:28 UTC](https://meta.discourse.org/t/using-redis-then-dump-data-is-just-great/42431/1 "2016-04-12T07:28:49Z")

</div>

Hello,  
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.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2016 年 4 月 12 日午前 7:29 UTC](https://meta.discourse.org/t/using-redis-then-dump-data-is-just-great/42431/2 "2016-04-12T07:29:43Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Aymane\_Shuichi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aymane_shuichi/32/63024_2.png) [@Aymane\_Shuichi](https://meta.discourse.org/u/Aymane_Shuichi)
#### Post date: [2016 年 4 月 12 日午前 7:32 UTC](https://meta.discourse.org/t/using-redis-then-dump-data-is-just-great/42431/3 "2016-04-12T07:32:41Z")

</div>

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

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2016 年 4 月 12 日午前 7:33 UTC](https://meta.discourse.org/t/using-redis-then-dump-data-is-just-great/42431/4 "2016-04-12T07:33:50Z")

</div>

Yes it does.

You should read the [source code](https://github.com/discourse/discourse) to learn more about how Discourse works 😉

---

<div class="post-metadata">

### Author: ![Aymane\_Shuichi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aymane_shuichi/32/63024_2.png) [@Aymane\_Shuichi](https://meta.discourse.org/u/Aymane_Shuichi)
#### Post date: [2016 年 4 月 12 日午前 7:37 UTC](https://meta.discourse.org/t/using-redis-then-dump-data-is-just-great/42431/5 "2016-04-12T07:37:22Z")

</div>

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