Hello guys,
First of all, I want to thank the Flarum team for making this software possible. I've been using many forum softwares for over 10 years (since I was a little kid, back in 2000), both as an user and an admin. Using Flarum is quite a joyful experience.
It all started when I first heard about Flarum from various communities a few months ago. During that time, I have been using Xenforo for my main website. Recently, I was looking for a new forum software to test around, and see if it inspires any idea for a new forum (I'm still using Xenforo for my current forum). I looked at phpBB, Vanilla, Discourse, NodeBB, and Flarum. Here are the criterias I used to find what fit my need:
- Easy to implement on AWS: My other websites are hosted on Google App Engine, and Google Cloud. However, being an AWS certified solutions architect, I thought I should build some high scalability website on AWS also.
- MySQL type database: Being on AWS, the software should be compatible with the easiest managed database solutions on AWS so I don't have to maintain database. Discourse uses PostgreSQL (AWS supports it), NodeBB uses Redis (supported). All the other softwares use MySQL/MariaDB (supported). I don't have to remove anything from the list.
- Modern UI: This really comes down to preferences, so I will try to use my target audiences. I'm planning to make a forum for young Vietnamese people and expats in Vietnam to share culture. The target audiences are young, not tech savvy people, but they like beautiful UI with simplicity. I found that NodeBB, Discourse and Flarum are all one page applications with beautiful UI out of the box. I remove phpBB & Vanilla from the list and go with those more modern forums.
- Open sourced: I have to remove Discourse because I'm not looking for adding licensing fee to my budget. (Edit: Discourse is indeed open sourced, for some strange reason I just like to compare NodeBB and Flarum better)
It now comes down to NodeBB and Flarum. They're both great, and it's a hard decision. I took a leap of faith and went with Flarum because of the following reasons:
- AWS supports MySQL, MariaDB and Aurora, it means that I can achieve better scalability if my forum goes popular. I'm not saying that Redis is not scalable, but
- PHP language is easy to work with and to hire developers for.
- I have never seen any PHP forum software that is as beautiful (one page application and simple looking) as Flarum. I think it will be great and easy enough for my users to use.
- I found Flarum to be fast and have great performance score on GTmetrix, so the development team must have done something right. We're still in early stage and I feel that you guys take care of the product well and didn't add any bloated unnecessary features.
My next step was to test how well it works with AWS. Here's the current setup for https://viet.vn
- EC2 instances in 3 availability zones, behind 1 Elastic Load Balancer.
- Autoscaling is enabled
- The AWS load balancer is behind CloudFlare proxy with CloudFlare Railgun enabled to reduce bandwidth cost and optimize speed.
- Amazon RDS MariaDB for database.
- Amazon ElastiCache with Memcached enabled for CloudFlare Railgun support
- Most importantly, Elastic File System to unify one central folder for all web contents, including avatars and attachments that will be generated by users. This is one of the reasons why I use AWS.
The result: It loads pretty fast and achieve high pagespeed score within the US (The infrastructures are located in Oregon, US-west 2). However, from Southeast Asia, it takes about 3 seconds to load a few first page. I think lots of caching and optimization so that low end computers/phones can access will be necessary, it'd be wonder.
What I love about Flarum:
- Relative path: Just like many other large websites that terminate SSL on the load balancer level, I found that Flarum use relative path really well. Let me describe it a little bit: All EC2 instances run on port 80, config.php set https://viet.vn as the web address, load balancer (in my case CloudFlare's Flexible SSL) takes traffic on port 443, decrypt and terminates at CloudFlare level, pass all traffic back to AWS ELB and EC2 via port 80. It results in no performance hit on the web server, and still make the website secure. Why does it make my site secure when I terminate SSL at CloudFlare level? Because CloudFlare and Amazon Web Services use the same data centers in most regions (Oregon, Virginia, etc..)
- Fast loading: It's one of the fastest and most lightweight forum softwares I've ever seen.
- PHP & MySQL: This means that if the site goes popular, and if I want to make modification to the site, I can easily find PHP developers to do it.
How Flarum could work better:
- Better PaaS like compability: Use external services whenever necessary. For example, most PaaS don't have a shared consistent file system, so it's better to generate new static contents (avatars, attachments) to external services like imgur, S3, Google Cloud Storage, etc..
- CloudFlare compability: Try CloudFlare, it increases Flarum forum load speed, and add SSL for free. Since Flarum relies on Javascript and aim to be very fast, it's best to test compability with CloudFlare's Rocket Loader feature. It allows javascript to be loaded asynchronously. However current version of Flarum doesn't work well with Rocket Loader (blank content page on load at times).
- Caching: Either Memcached or Redis, or both. Redis can be used to store session/state, etc.. while Memcached can be used to cached frequently accessed pages/keys.
(to be continued, I'll write about how well it works with AWS and CloudFlare soon)