# Is discourse 'stateless'?

**URL:** https://meta.discourse.org/t/is-discourse-stateless/72380
**Category:** Development
**Created:** [October 18, 2017, 11:01pm UTC](https://meta.discourse.org/t/is-discourse-stateless/72380 "2017-10-18T23:01:54Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![iamphi](https://avatars.discourse-cdn.com/v4/letter/i/ba9def/32.png) [@iamphi](https://meta.discourse.org/u/iamphi)
#### Post date: [October 18, 2017, 11:01pm UTC](https://meta.discourse.org/t/is-discourse-stateless/72380/1 "2017-10-18T23:01:54Z")

</div>

I’ve identify these 3 components for my discourse forum hosted with AWS, behind an Elastic Load Balancer.  
A) web server (nginx/unicorn/RoR/redis). EC2 instance  
B) file storage. S3  
C) postgres db. RDS.

Is the A component stateless? Can I have many instance of A behind the ELB? Can I scale up/down A?  
My immediate task is to replace the current instance with a lower tier instance. My approach is to snapshot the current instance, spin up a new lower tier instance of the snapshot, add to ELB, and remove the old instance from ELB.

But in the future can I use autoscaling with A?

---

<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: [October 18, 2017, 11:06pm UTC](https://meta.discourse.org/t/is-discourse-stateless/72380/2 "2017-10-18T23:06:37Z")

</div>

Redis is not in A but in the D component.

In that case, yes, A is « stateless » 😉

---

<div class="post-metadata">

### Author: ![iamphi](https://avatars.discourse-cdn.com/v4/letter/i/ba9def/32.png) [@iamphi](https://meta.discourse.org/u/iamphi)
#### Post date: [October 18, 2017, 11:55pm UTC](https://meta.discourse.org/t/is-discourse-stateless/72380/3 "2017-10-18T23:55:08Z")

</div>

What state does redis hold? Is it okay to ignore it briefly to do my instance replacement? Does putting the forum into readonly mode help flush/freeze redis?
