Guidance on Discourse Hosting Infrastructure

I am hosting Discourse on an EC2 instance, and according to historical data from the CDN, the community size is anticipated to average around 20.03 million requests in a month. I would like suggestions on the number and size of instances needed, as well as whether auto-scaling is necessary.

1 Like

Hmm, it’s possible to run Discourse on one machine, using either one or two Docker containers, but I don’t think I’ve seen anything about spreading out over more than one instance. The usual story is to scale up to larger instances: more CPUs, more RAM. And one can use local storage or cloud storage for uploaded assets.

But that level of traffic is only one or two requests per second, which is think not a lot.

The usual story is to start on a small instance and resize as needed, according to memory usage and CPU load. If you have lots of money, start on a bigger instance.

Apologies, but it’s 20 million requests per month. The current website utilizes autoscaling with 7 t3a.medium instances and 1 t3a.large instance, and we are migrating this website to the Discourse platform. I would like suggestions on the number and size of instances needed, as well as whether auto-scaling is necessary.

It’s hard to guess just what you’ll need. I know of a site with 3.5M monthly page views on a 8GB 4CPU VM. You could use that as a guildeline. It’s serving images itself, which you can’t (easily?) do with multiple instances; you’ll presumably have assets on S3 and CDNs for the site and the S3 bucket.

Whether a “request” and a “pageview” are the same is somewhat unlikely.

Whether you need scaling depends on your traffic patterns. If you needed scaling before, then you probably will with Discourse. If your traffic is fairly consistent and you don’t need scaling, then the easy solution is a single big VM, and probably RDS and maybe Elasticache. It also depends on what tools and methods your team likes to use, your budget, and so on.

2 Likes

If a single large EC2 instance hosting Discourse goes down, Entire site will go down. pls provide solution to this. we plan to use RDS for database and elasticache

Then use ECS or whatever your favorite other solution is with a load balancer.

1 Like