Jump to content

New customer looking for advice on CDN/PHP Accelerators


Recommended Posts

Hello everyone.

I've started setting up my IPS in preparation for the launch of my network. To that end, since we're looking at having the highest possible number of concurrent users (it will be a publication of news/reviews in which revenue is only generated through advertising), I'm interested in optimizing the platform at the fullest.

Firstly, I need a CDN. We bought the servers on the US East Coast, because that company offered by far the best quality/price ratio, but most of our users will come from Europe.

I've been looking at CloudFlare, but I'm not sure how to install it so that it works with all the applications - Content, Board, etc. Do you advice that I use the CloudFlare plugin for cPanel?

Also, I've been reading about PHP accelerators. These seem like they could be very useful, but I'm wondering if there is any preferred solution for IPS - APC, XCACHE or eAccelerator? The similar question for CDN applies here as well - how do I install so that all IPS applications can benefit from it?

Thanks in advance for those willing to help.

Link to comment
Share on other sites

CDN: MaxCDN (Quality but no Asia support yet)
PHP caching: xCache (It is currently the fastest)

APC is supported by PHP team and confirmed to be in PHP 6 (released in 2014), eAccelerator is dead.

Cloudflare is now a bad CDN provider because they have been "banning"/shutting down sites temporarily that are under heavy attacks. (complains from those who went for the free version)

Link to comment
Share on other sites

CDN: MaxCDN (Quality but no Asia support yet)
PHP caching: xCache (It is currently the fastest)

APC is supported by PHP team and confirmed to be in PHP 6 (released in 2014), eAccelerator is dead.

Cloudflare is now a bad CDN provider because they have been "banning"/shutting down sites temporarily that are under heavy attacks. (complains from those who went for the free version)

Well, eAccelerator is not dead actually. The project has been picked up by another developer and it has been moved to github. https://github.com/eaccelerator/eaccelerator

Also, MaxCDN does not offer a free profile and we do not currently have the needs and/or funds to pay for CDN. I will have to choose between CloudFlare and Incapsula, most likely.

Link to comment
Share on other sites

Cloudflare is now a bad CDN provider because they have been "banning"/shutting down sites temporarily that are under heavy attacks. (complains from those who went for the free version)

I'm not at all sure that's fair. It's also not fair to their paying customers to have sites under heavy attack compromising their own. If anything, you should have said "Cloudflare is a bad free CDN" which I don't necessarily agree with either. The user has to decide if the features of the paid plans are of value to them or not. Put it this way, for users like myself with about 750k pageviews per month, the free Cloudflare is an absolute no-brainer when paired with CSF and the Apache plugin. If I continue to grow and experience any kind of DDoS attack, I'd jump at the $200/month Business plan.

Link to comment
Share on other sites

testing the cloudflare cpanel plugin, having lot of issues (and mod_cloudflare IS installed too) getting correct visitor ip's even with cloudflare ip's added to rpaf.conf.

I would stay away from it and let users just do it manually if they want cloudflare, but I had better luck with incapsula when testing the 2.

I use maxcdn pull zones, price isn't that bad.

Link to comment
Share on other sites

testing the cloudflare cpanel plugin, having lot of issues (and mod_cloudflare IS installed too) getting correct visitor ip's even with cloudflare ip's added to rpaf.conf.

I would stay away from it and let users just do it manually if they want cloudflare, but I had better luck with incapsula when testing the 2.

I use maxcdn pull zones, price isn't that bad.

Try to add this (conf_global or at the top of index.php):



if(isset($_SERVER["HTTP_CF_CONNECTING_IP"])){
   $_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_CF_CONNECTING_IP"];
}
Link to comment
Share on other sites

that was something I was wondering about, may try that. thanks

I am first trying to get the actual backend working as it should though as with mod_cloudflare sites should not have to do that.

now I use cpnginx proxied to apache BUT mod_cloudflare is still supposed to work with cf ips added to the conf file, but it doesn't.

if I can get that worked out the cpanel plugin is useful for those what want to use it, I only host for a few friends and CF would be used more for web firewall really.

incapsula is looking to do a cpanel plugin too, and their data reporting is a lot better on free versions.

Link to comment
Share on other sites

Our site uses probably one of the most elaborate setups but it works beautifully.

High level Accelerator: Cloudflare Pro (Better DNS pings, Highly responsive to DNS changes) and HTTP Distribution

  • Cloudflare drops about 500-600ms for TTFB for users in singapore/asia/australia (our servers based in Florida)
  • The biggest thing for cloudflare is figuring out what you need it to do, we have cloudflare do very lttle in terms of "performance changes" other than routing our http around the world 2x as fast as we can.
  • Also we used modcloudflare to fix the IP issue.

CDN: Amazon Cloudfront *Primary CDN* -> Cloudflare *secondary CDN* (for legacy images that aren't hosted via cnamed urls for our CDN)

HTTP Acceleration: Varnish, via UNIXY WHM Plugin

  • We have our users routed around the cache to give them always fresh content and it works brilliantly. Varnish has reduced our processors usage to almost zero, while only requiring about 200mb of ram.

Apache: FastCGI + Xcache

  • Works flawlessly with ipboard, and as mentioned one of the fastest php object caches around.
  • If you don't have alot of experience messing with this stuff get a pro like gary to help you out, hes a wizard at optimizing your php handler
Link to comment
Share on other sites

meant to clarify with you in other thread, you ARE on whm/cpanel right? you mentioned directadmin so I wanted to verify.

had used fcgi with apc but kept getting /tmp space warnings (cpanel bug) but had not tried xcache.

yeah we are on WHM/Cpanel.

Also similarly we had issues trying apc. And eaccellerator was slow for us, didn't do nearly as much as xcache did for speed. But xcache is rock solid and super quick.

Link to comment
Share on other sites

Our site uses probably one of the most elaborate setups but it works beautifully.

High level Accelerator: Cloudflare Pro (Better DNS pings, Highly responsive to DNS changes) and HTTP Distribution

  • Cloudflare drops about 500-600ms for TTFB for users in singapore/asia/australia (our servers based in Florida)
  • The biggest thing for cloudflare is figuring out what you need it to do, we have cloudflare do very lttle in terms of "performance changes" other than routing our http around the world 2x as fast as we can.
  • Also we used modcloudflare to fix the IP issue.

CDN: Amazon Cloudfront *Primary CDN* -> Cloudflare *secondary CDN* (for legacy images that aren't hosted via cnamed urls for our CDN)

HTTP Acceleration: Varnish, via UNIXY WHM Plugin

  • We have our users routed around the cache to give them always fresh content and it works brilliantly. Varnish has reduced our processors usage to almost zero, while only requiring about 200mb of ram.

Apache: FastCGI + Xcache

  • Works flawlessly with ipboard, and as mentioned one of the fastest php object caches around.
  • If you don't have alot of experience messing with this stuff get a pro like gary to help you out, hes a wizard at optimizing your php handler

That seems a little complicated and pricey for us. The best we could go would probably be:

  • Cloudflare (or Incapsula) free for CDN and security
  • Varnish seems very interesting, we're going to have lots of dynamic content. I use Inmotion Hosting, but maybe I could install Varnish through this cPanel script? http://applications.cpanel.net/varnish-cache-cpanel-addon-script/
  • It seems like by default InMotion uses suPHP, however there is the possibility to ask to change it to support FastCGI protocol. Is this worth it, though, for IPS applications?

Also, who's exactly this Gary? I have read him mentioned a lot, but couldn't figure out yet who actually is in the forum.

Link to comment
Share on other sites

that is the unixy plugin mentioned, its easy to install and tune.

however its done at whm level, if n shared host they may consider it or some actually do run it.

do not use the apachebooster plugin, varnish seems to do nothing and apache restarts often for people.

if they are using suphp then I would bet its shared host, doubt they would change php handlers due to suphp allows customers to use custom php.ini.

Link to comment
Share on other sites

that is the unixy plugin mentioned, its easy to install and tune.

however its done at whm level, if n shared host they may consider it or some actually do run it.

do not use the apachebooster plugin, varnish seems to do nothing and apache restarts often for people.

if they are using suphp then I would bet its shared host, doubt they would change php handlers due to suphp allows customers to use custom php.ini.

We are using a VPS solution.

Link to comment
Share on other sites

now I got CF reporting ip's correctly I am testing varnish proxied to apache (unixy plugin for cpanel and the cloudflare plugin also) with apc (for now) and cloudflare pro with the images themselves coming from maxcdn pull zones using a cname.

its actually working pretty seamlessly, the main site is prone to sudden guest spikes where this really helps. I also, for various reasons, needed the waf capability and while not as good as incapsula the cf waf is useful.

other sites on the server also benefiting from varnish/cloudflare using free cloudflare.

like anything else one size does not fit all, and I had only installed the cpanel cloudflare plugin to help some friends out but its been pretty good for me.

when incapsula builds one I will test that too.

options are cool :)

Link to comment
Share on other sites

now I got CF reporting ip's correctly I am testing varnish proxied to apache (unixy plugin for cpanel and the cloudflare plugin also) with apc (for now) and cloudflare pro with the images themselves coming from maxcdn pull zones using a cname.

its actually working pretty seamlessly, the main site is prone to sudden guest spikes where this really helps. I also, for various reasons, needed the waf capability and while not as good as incapsula the cf waf is useful.

other sites on the server also benefiting from varnish/cloudflare using free cloudflare.

like anything else one size does not fit all, and I had only installed the cpanel cloudflare plugin to help some friends out but its been pretty good for me.

when incapsula builds one I will test that too.

options are cool smile.png

Good to know, but I'm unfortunately too much of a noob when it comes to dealing with these things. Do you know any webmaster-for-hire or something like that around here?

Link to comment
Share on other sites

do you have root access to the vps?

so much depends on that that its hard to say what would help you w/o knowing, varnish/nginx and opcode cache programs need to be installed by someone with that level.

as far as cloudflare you do not NEED the cpanel plugin, can do it the manual way explained in their setup video by editing cnames.

the cpanel plugin just makes it easy, literally press a button.

maxcdn basically the same way, just create a cname for the pull zone and enter that in the acp-general settings area.

Link to comment
Share on other sites

do you have root access to the vps?

so much depends on that that its hard to say what would help you w/o knowing, varnish/nginx and opcode cache programs need to be installed by someone with that level.

as far as cloudflare you do not NEED the cpanel plugin, can do it the manual way explained in their setup video by editing cnames.

the cpanel plugin just makes it easy, literally press a button.

maxcdn basically the same way, just create a cname for the pull zone and enter that in the acp-general settings area.

Yes, I have root access.

Link to comment
Share on other sites

if you want to install cloudflare cpanel plugin then you need to signup for it, took me 5 minutes to do.

https://www.cloudflare.com/certified-partners

once you are accepted and get the api key you install per the instructions sent.

once installed and running right I used this

http://tltech.com/info/installing-mod_cloudflare-on-cpanel/

to install the mod_cloudflare easyapache module for IP logging.

Link to comment
Share on other sites

if you want to install cloudflare cpanel plugin then you need to signup for it, took me 5 minutes to do.

https://www.cloudflare.com/certified-partners

once you are accepted and get the api key you install per the instructions sent.

once installed and running right I used this

http://tltech.com/info/installing-mod_cloudflare-on-cpanel/

to install the mod_cloudflare easyapache module for IP logging.

What's the difference with normal account signup?

Link to comment
Share on other sites

  • 2 weeks later...


Try to add this (conf_global or at the top of index.php):



if(isset($_SERVER["HTTP_CF_CONNECTING_IP"])){
$_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_CF_CONNECTING_IP"];
}

I would recommend you don't do that since it allows any user to tell the server they are connecting from any IP they want to.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...