If you want to scale out Flarum to multiple servers, chances are you will encounter a file system problem, such as @justshipit 's problem with Heroku using temporary file system.
I found a few solutions and thought some people can find it useful.
For now, I'll focus on using the managed services that Amazon Web Services offer, identified by locations:
Oregon, Virginia, and Ireland
- If you host your website in one of these locations, you are in luck. Amazon has a new thing called Elastic File System.
- It uses standard NFSv4, can basically scale infinitely, with thousands of instances using a centralized web data folder.
- It's currently in Preview at Oregon region. From their recent seminars at AWS re:Invent 2015, they announced that general availability will include Oregon, Virginia, and Ireland.
(unfortunately no Japan location, where I want to host my site, so I gotta look at some other alternatives)
I was thinking something like GlusterFS. However, it's not feastable for autoscaling because one instance always needs to know the IP/hostname of other instances to peer, and that can't be done automatically via AWS meta-data.
At last, I found something (few minutes ago):
for Japan, Singapore, and other locations without EFS support.
- Besides from the official s3fs, riofs, I just found out a few minutes ago that we can use either Memcached or Redis as file system, using some open sourced software available on the internet.
- Why do I mention using Memcached or Redis as file system? It's a managed service that can scale to a certain extend on AWS, supporting connections from multiple instances. That's good enough for now when my forum doesn't take much of hard disk space.
- There are actually quite a few Memcachedfs and Redisfs options out there. I'm testing some of them and hopefully finding the one that fits my need.
If you have experience with memcache & redis file system softwares, please share your recommendations here. It's greatly appreciated.