Forum

Thread tagged as: Question, Hosting, Suggestions

Does Perch Support AWS Auto-scaling?

Hey Folks,

Has anyone run Perch on AWS w/Auto-Scaling groups? For Perch to horizontally scale the server needs to be stateless. While most of the content is stored in the database, Perch stores plugins, templates and etc on the file-system. Is there a workaround for this to support horizontal scalability? Has anyone come across a similar issue?

Any thoughts and suggestions would be most appreciated.

Junaid Kapadia

Junaid Kapadia 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

What sort of workaround are you looking for?

Hey Drew,

I'm looking to use Perch across multiple servers serving the same website. For example, I'd like to have 3 servers fronted by a load balancer. When a user visits a webpage it hits the load balancer which then routes it to one of the three instances running Perch. Problem with the current setup is the data between three servers will be inconsistent as they house their own file systems. For me to be able to keep the data consistent I could offload the file systems to a network file system or say S3. The network file system comes with the obvious limitation of latency while S3 might be a bit faster. So I'm simply trying to understand if there is any built-in support for such in Perch or a different solution that I might be overlooking here.

Drew McLellan

Drew McLellan 2638 points
Perch Support

The data on the file system doesn't change as the site is accessed, so does this not just come down to your build/deploy system?

Huh, good point! The only time the data on the file-system is changing is when I'm adding new templates, content items, plugins and etc. Usually this is done on initial site creation and only touched if new items need to be added. Whenever I do make a change I just have to ensure I deploy the new version of the file system. I could still go the NFS route if I want to avoid re-deploying. Thanks Drew I have a few options here on how to do this now.

Just to be sure here, the data on the FS also doesn't change when I'm accessing the admin interface and making edits there, correct?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Only if you upload new assets. If you use Runway and put those in an S3 bucket then that's also covered.

Gotcha. Thanks Drew.