Is discourse 'stateless'?


#1

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?


(Régis Hanol) #2

Redis is not in A but in the D component.

In that case, yes, A is « stateless » :wink:


#3

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?