Server performance

Second the suggestion of Cloudfare to add some caching while the root issue is found. Unfortunately I don’t know crap about Ruby so not sure what other optimization could be made but Cloudfare+datadog (even if just for 7 day trial) to see how the app runs normal would give a lot of insight into what the issue is.

Search along if not using the proper indexes can take down a site. So I wouldn’t rule that out.

I also recommended cloudflare until I learned how the site was setup. Cloudflare wouldnt do anything.

the site’s static assets are served via CDN.
most of the load is from site activity being interacted with like navigation, loading posts, liking disliking etc.

Fuck datadog they wont stop harrassing me to buy their shit.

netdata/nagios/snmp/ is all you need.
zabbix if you have patience.

I have a few things in mind that may help. but without real auditting off where the load is it would be unwise to make changes.

I think clustering is likely our best bet. but again, needs investigation to prove this would actually help. Discourse by itself isn’t very heavy in terms of performance. The load really comes from user activity. we are a very high traffic website.

Caching is a non-starter because we use a CDN.

This is using the docker configuration but I suspect I may end up eventually switching this to Nixos to declaratively configure it without the overhead of kernel namespaces.

Besides clustering I have in mind potentially finding affordable colocation. This is unlikely since colocation and affordable are never in the same sentence.

the pg database is something I still need to investigate, I haven’t looked there yet, but there is a likelihood this might be where the load is, and I may either setup indexes or cluster this with a loadbalancer.

Like I said. Lots to investigate.
Unfortunately I don’t have a lot of time. Between my day job, personal projects, and persuing OSCP/OSDA certifications I have a lot on my plate.

Edit: To give a bit of perspective to understand how much traffic we see.
This is our metrics right as of posting this.
image

If you do the math we have about 100 page views per minute (today when posting this)

Lol fair . Seems you know your shit just need time to troubleshoot like you said. Gl with troubleshooting and your Certs :moneybag::moneybag:

I appreciate all your work keeping the site running as good as possible!
We are a community after all and most of us are contributing for free on our free time and IRL tend to have priority. For my part IRL stuff is a huge factor for why I release so few scripts these days.