1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Traffic proofing the site

Discussion in 'Server Configuration and Hosting' started by vexx, Mar 6, 2014.

  1. vexx

    vexx Active Member


    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
  2. RoldanLT

    RoldanLT Well-Known Member

    Replace Apache with Nginx. ;)
    Use PHP 5.5.9 with Zend Opcache.
    You may use BD Cache addon (y)
    D.O.A. and MattW like this.
  3. Mouth

    Mouth Well-Known Member

    Disable any non-essential addons, temporarily. You want core functionality and performance, not bling and nice to haves.
    vexx likes this.
  4. Floren

    Floren Well-Known Member

    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.
  5. W1zzard

    W1zzard Well-Known Member

    +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.
  6. Null

    Null Well-Known Member

    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.
    vexx likes this.
  7. vexx

    vexx Active Member

    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.
  8. Null

    Null Well-Known Member

    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.
    vexx likes this.
  9. vexx

    vexx Active Member

    Thanks alot, really appreciate it but it's not necessary - i'll contact him to see if he has any spare time.
  10. Floren

    Floren Well-Known Member

    This should help with about 1% for server load in your current situation, don't count too much on it.
    vexx likes this.
  11. DRaver

    DRaver Active Member

  12. RobParker

    RobParker Well-Known Member

    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.
  13. Ghan_04

    Ghan_04 Active Member

    How large is your database? That's probably a significant influence on how much your server can handle as well.
  14. Jim Boy

    Jim Boy Well-Known Member

    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.

Share This Page