# Redundant Discourse Hosting on AWS

**URL:** https://meta.discourse.org/t/redundant-discourse-hosting-on-aws/28358
**Category:** Self-hosting
**Tags:** hosting
**Created:** [May 5, 2015, 6:31pm UTC](https://meta.discourse.org/t/redundant-discourse-hosting-on-aws/28358 "2015-05-05T18:31:27Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![bboyle1234](https://avatars.discourse-cdn.com/v4/letter/b/c57346/32.png) [@bboyle1234](https://meta.discourse.org/u/bboyle1234)
#### Post date: [May 5, 2015, 6:31pm UTC](https://meta.discourse.org/t/redundant-discourse-hosting-on-aws/28358/1 "2015-05-05T18:31:27Z")

</div>

I initially intended to host my forum in a way that is protected against server hardware failure by having it hosted in AWS in the following way:

RDS for PostGres,  
Elasticache for Redis,  
S3 for user uploads  
2 docker installations in different data centers  
Load balancer

With S3 support deprecated, how can I achieve hardware failure-proof hosting now?

---

<div class="post-metadata">

### Author: ![bboyle1234](https://avatars.discourse-cdn.com/v4/letter/b/c57346/32.png) [@bboyle1234](https://meta.discourse.org/u/bboyle1234)
#### Post date: [May 5, 2015, 6:33pm UTC](https://meta.discourse.org/t/redundant-discourse-hosting-on-aws/28358/2 "2015-05-05T18:33:29Z")

</div>

I know that I can use regular disk backups to protect against loss of data from hardware failure. My question is not about safety of the data, but being able to keep the forum alive when there is a hardware or datacenter issue.

---

<div class="post-metadata">

### Author: ![purldator](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@purldator](https://meta.discourse.org/u/purldator)
#### Post date: [May 5, 2015, 9:18pm UTC](https://meta.discourse.org/t/redundant-discourse-hosting-on-aws/28358/3 "2015-05-05T21:18:46Z")

</div>

Multiple VPSes connected via VPN threading them together to share data. You mentioned S3, I know AWS serves load balancing features.

---

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [May 5, 2015, 9:54pm UTC](https://meta.discourse.org/t/redundant-discourse-hosting-on-aws/28358/4 "2015-05-05T21:54:08Z")

</div>

If you are going down the entirely AWS route [Amazon Elastic File System (EFS)](http://aws.amazon.com/efs/) is probably what you are after for storage, available across multiple Availability Zones (AZs) connected to multiple instances at the same time…

If you check out [this map](https://www.google.com/maps/d/u/0/viewer?mid=z8tAG_iMI0RE.kBLn8p8h4GGw&msa=0) you can see that most / if not all AZs are in different data centres within the same region.

---

<div class="post-metadata">

### Author: ![bboyle1234](https://avatars.discourse-cdn.com/v4/letter/b/c57346/32.png) [@bboyle1234](https://meta.discourse.org/u/bboyle1234)
#### Post date: [May 5, 2015, 10:21pm UTC](https://meta.discourse.org/t/redundant-discourse-hosting-on-aws/28358/5 "2015-05-05T22:21:52Z")

</div>

I will check out EFS thank you Dean 🙂

Does anyone know how to configure discourse to store the uploads in a  
custom location as would be required with the attached EFS?

---

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [May 5, 2015, 10:22pm UTC](https://meta.discourse.org/t/redundant-discourse-hosting-on-aws/28358/6 "2015-05-05T22:22:51Z")

</div>

It’s all about mounting file systems - standard linux stuff - nothing to configure in Discourse.

---

<div class="post-metadata">

### Author: ![bboyle1234](https://avatars.discourse-cdn.com/v4/letter/b/c57346/32.png) [@bboyle1234](https://meta.discourse.org/u/bboyle1234)
#### Post date: [May 5, 2015, 10:29pm UTC](https://meta.discourse.org/t/redundant-discourse-hosting-on-aws/28358/7 "2015-05-05T22:29:51Z")

</div>

Yes, mounting the filesystem as an extra drive in Linux is fine. But discourse is hosted on the instance’s primary drive and naturally keeps user uploads there. I would need to tell it to keep the user uploads on the EFS drive, a non standard setting. Do you know how to do that?

Am i making the question clearer or proving i don’t understand!? 🙂

---

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [May 5, 2015, 10:32pm UTC](https://meta.discourse.org/t/redundant-discourse-hosting-on-aws/28358/8 "2015-05-05T22:32:29Z")

</div>

Drives are not mounted as drives - you are thinking of Windows…

You mount to a folder say `/my-lovely-new-storage` or `/my/usr/home/complicated/path` etc - you probably need to do a bit more reading up on mounting file systems in `*nix ` environments.

In addition to this `symlinks` come in handy read up on those too.

---

<div class="post-metadata">

### Author: ![bboyle1234](https://avatars.discourse-cdn.com/v4/letter/b/c57346/32.png) [@bboyle1234](https://meta.discourse.org/u/bboyle1234)
#### Post date: [May 5, 2015, 10:37pm UTC](https://meta.discourse.org/t/redundant-discourse-hosting-on-aws/28358/9 "2015-05-05T22:37:34Z")

</div>

> [@DeanMarkTaylor](#):
>
> Drives are not mounted as drives - you are thinking of Windows…
> 
> You mount to a folder say /my-lovely-new-storage or /my/usr/home/complicated/path etc - you probably need to do a bit more reading up on mounting file systems in \*nix environments.

Great! That’s the second thing i learned from you today 🙂

But… Still need to tell discourse to store the files there… Discourse itself cannot be installed on the EFS drive and run by several machines simultaneously, can it?

---

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [May 5, 2015, 10:47pm UTC](https://meta.discourse.org/t/redundant-discourse-hosting-on-aws/28358/10 "2015-05-05T22:47:42Z")

</div>

Your questions don’t need to be asked of Discourse… you should ask them of [Discourses components, including nginx](https://github.com/discourse/discourse_docker/blob/master/templates/web.template.yml).

I think from what you have said you have a little mountain of a learning curve to join all the components together.

All I can say is: get your AWS calculator out and make sure it makes sense - the [Official Discourse Hosting](https://discourse.org/pricing/) might be a better bet - once you factor in the cost of your time.

---

<div class="post-metadata">

### Author: ![bboyle1234](https://avatars.discourse-cdn.com/v4/letter/b/c57346/32.png) [@bboyle1234](https://meta.discourse.org/u/bboyle1234)
#### Post date: [May 5, 2015, 11:02pm UTC](https://meta.discourse.org/t/redundant-discourse-hosting-on-aws/28358/11 "2015-05-05T23:02:42Z")

</div>

Are you saying to mount the EFS storage over the top of the folder discourse normally uses?

---

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [May 5, 2015, 11:20pm UTC](https://meta.discourse.org/t/redundant-discourse-hosting-on-aws/28358/12 "2015-05-05T23:20:40Z")

</div>

Perhaps not the whole folder, maybe just uploads - it depends entirely on how you wish configure your solution - you are designing it here.

---

<div class="post-metadata">

### Author: ![nahtnam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nahtnam/32/122073_2.png) [@nahtnam](https://meta.discourse.org/u/nahtnam)
#### Post date: [May 13, 2015, 4:34am UTC](https://meta.discourse.org/t/redundant-discourse-hosting-on-aws/28358/15 "2015-05-13T04:34:27Z")

</div>

Hey!

I think I found a solution, but truthfully I dont know how to set it up.

It would be great if you could check this out:

[https://github.com/s3fs-fuse/s3fs-fuse](https://github.com/s3fs-fuse/s3fs-fuse)

> **[Fuse Over Amazon](https://github.com/s3fs-fuse/s3fs-fuse/wiki/Fuse-Over-Amazon)**
>
> FUSE-based file system backed by Amazon S3. Contribute to s3fs-fuse/s3fs-fuse development by creating an account on GitHub.

Thanks.

---

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [May 13, 2015, 11:44am UTC](https://meta.discourse.org/t/redundant-discourse-hosting-on-aws/28358/16 "2015-05-13T11:44:54Z")

</div>

S3 support deprecated decision has been reversed.

The topic of an S3 replacement is perhaps now irrelevant.

---

<div class="post-metadata">

### Author: ![bboyle1234](https://avatars.discourse-cdn.com/v4/letter/b/c57346/32.png) [@bboyle1234](https://meta.discourse.org/u/bboyle1234)
#### Post date: [May 13, 2015, 11:56am UTC](https://meta.discourse.org/t/redundant-discourse-hosting-on-aws/28358/17 "2015-05-13T11:56:59Z")

</div>

Hoorayy!!!  
Wonderful!!!  
Thank you so much!!!

How did you do it … create new files/objects instead of changing existing files/objects?
