Traffic proofing the site

vexx

Active member
Hey,

We're about to receive a massive traffic spike on Friday as we're hosting a Q&A with a company that will send huge amount of traffic to our site, were the Q&A is hosted. I want to be sure that my server and XF handles all that load and I want to ask you guys what else I can do do optimize the site.

What I did so far:

- XF is cached with memcached and the front with Zend Core (as advised in XF's documentation)
- the server runs on Apache and it's configured with 1000ish server limit
- mysql is optimized (to some extent)

This is a dedicated server - a dual core with 12 gigs of ram..the XF is the only installation there. Are there any methods/tips on further optimizing XF?

Thanks alot
 
If the traffic is big, your site will go down for sure. A dual core with 12G will not withstand the pounding of thousands of users. Install Siege on your server and run several tests to emulate 1-10,000 users hitting the site simultaneously, this should give you a good idea how the server will react on the BIG day. The safest way for you is to install a cache system (i.e Varnish, Nginx Cache) and cache the entire site for guests. Also look into optimizing the sysctl settings related to networking. If your NIC's are weak, the site will choke under extreme TCP pressure you apply to the server.
 
+1 for siege testing.

Your apache server limit seems too high. You need server limit x size of 1 apache process memory, or your machine will swap = bad. Don't worry if server limit seems low, if apache runs out of processes it will put the waiting ones in a queue, which will be faster than 900 processes trashing your swap disk.

Is the QA in the forums or on your main site? You definitely want some PHP opcode cache.
 
If your site generally has quite a lot of traffic, I'd suggest moving away from Apache to nginx, or if technical reasons prevent you from doing so, at least run nginx as a reverse proxy.
 
Thanks alot for all the tips, really appreciate it.

I'm afraid there's no time for installing nginx, I have 0 experience with it and to be able to test it and configure it, I'd need more than "less a day". As for the caching, the site is currently cached with APC and Memcache. I know that's not bullet proof but it's a start. Also, the siege testing is an awesome idea, I'll get on it.
 
Thanks alot for all the tips, really appreciate it.

I'm afraid there's no time for installing nginx, I have 0 experience with it and to be able to test it and configure it, I'd need more than "less a day". As for the caching, the site is currently cached with APC and Memcache. I know that's not bullet proof but it's a start. Also, the siege testing is an awesome idea, I'll get on it.
If you can get hold of @MattW (he's very busy lately) and he configures nginx for you, I'll pay his fees for you.
 
If you can get hold of @MattW (he's very busy lately) and he configures nginx for you, I'll pay his fees for you.

Thanks alot, really appreciate it but it's not necessary - i'll contact him to see if he has any spare time.
 
We run a quad-core with 24GB of RAM and we have huge spikes of traffic on certain days of the year each year. We'd go from having around 1000-1500 users online to 5000+ and we struggle massively with it.

As others have said, disable every addon that you're able to (we have to disable stuff like Post Ratings) but even then depending on how busy you are I think you're likely to struggle.
 
We run a quad-core with 24GB of RAM and we have huge spikes of traffic on certain days of the year each year. We'd go from having around 1000-1500 users online to 5000+ and we struggle massively with it.

As others have said, disable every addon that you're able to (we have to disable stuff like Post Ratings) but even then depending on how busy you are I think you're likely to struggle.

How large is your database? That's probably a significant influence on how much your server can handle as well.
 
https://xenforo.com/community/resources/bd-cache.2763/ allegedly will cache guest pages.

However I found this addon will trip up on forum_list from time to time when under duress, so I deinstalled it.

IMO the best solution for any site that has significantly spiky traffic but cant afford to have the infrastructure that would hit those peaks every minute of the year must use automatic server scaling. Thats the method we use and I think I run the spikiest xenforo installation going around, not something this guy can do in the time required unfortunately.

One small thing to look out for is that you should reduce the time that you consider your users to be online - their is a known bug that will cause the forum list and possibly other pages to crash when there are too many concurrent users.
 
Back
Top Bottom