Jump to content

What stack to use?


Recommended Posts

Posted

We are in the process of migrating to IPB, and I'm using this as an opportunity to start fresh. Our board is 1million+ posts with about 1 million pageviews a month. We are on a single core dedicated running LAMP at dreamhost, but MySQL is on a separate VPS. It is safe to say I am not a server ninja although I have familiarity with the options.

I've done a ton of reading on this topic here and elsewhere about what the best stack is, as well as server setup. Obviously this is fairly subjective and depends a lot on what kind of apps you are running. In our case we will be running the IP Suite but using Wordpress for content.

I'm still torn on having two VPS on something like Linode or getting a dedicated somewhere and running everyone on one box. Also using a CDN when possible.

My question though is what the best stack to run is for IPB? I've read a lot about Varnish and played around with it, but I sounds like it can be rough getting going and doesn't provide any better performance then nginx. I've read about using a pure nginx setup using PHP-FPM and using nginx in front of apache. It seems the only reason to do the later is if apache can process the php faster then PHP-FPM, but it's still not clear that is the case. I know nginx needs to have the htaccess files converted, but is the case with the proxy pass setup? Is this why people use the proxy pass?

So in summary I'm wondering whether nginx/apache proxy pass is better then nginx/PHP-FPM.

Also, if you are a server ninja and looking for work feel free to drop me a PM as I'm considering not doing this myself at this point.

TIA.

Posted

I'm a fan of nginx+PHP-FPM. PHP 5.4 improved FPM's performance so that it's equal to or faster than mod_php, with substantially less memory use. With nginx you can also utilize fastcgi_cache, which is functionally built-in Varnish to serve cached pages to guests without having to hit PHP or MySQL.

Nginx rewrite rules are pretty straight forward for IPS. There's a thread with configs that work perfectly. Wordpress' rewrites have been similarly converted, I believe.

I would also go with a dedicated server. Your community is big enough that dedicated resources (especially disk) are needed. VPS performance can be inconsistent even at a quality provider.

With the move you'll have to configure your own database server instead of Dreamhost's managed VPS. I'd go with MariaDB (MySQL compatible fork with substantial performance improvements) and use InnoDB tables with sphinx for search.

Posted

2 vps vs 1 dedicated is a very easy to answer question. They put LOT more than 2 vpses per dedicated server. Thus, the single dedicated is lot stronger.
Though, details of what cpu/disk/etc the vps and dedi runs makes a significant difference, but still, it makes no sense to get two vpses in terms of dollar value to performance.
Simply, just get a sparkly new dedi with fairly new cpu (sandy bridge or newer), fair sized ram and 2 ssd on soft raid 1. You can probably get something like that for $120~200. There's no 2x vps on earth that's going to best what I just specified. Or even 10 of them.

Varnish is not appropriate for a forum. The design goal of varnish and a forum does not match. It goes quite well for something like wordpress, but no a forum. Thus, even at factory settings or both tweaked, varnish won't be really be beating nginx performance wise even though it consumes more ram. I wish that varnish thread in this forum would get locked and be sunk into past pages to prevent people being confused, but I doubt it's going to happen.

CDN does not greatly benefit a forum either, for the same reason as varnish. Each user, even guests, are given a unique experience tailored to them. If you visited something, it's marked as visited. If there are new topics since you last visited, like 1min ago, then it's to be marked as unread. All these unique and 100% dynamic behavior cannot be cached. So, the CDN cannot be made into use in most places. The CDN can be used to store images, css and js files. But you should be putting expiration on those file headers so that users download them only once anyway. So with the exception of the first visit, the difference CDN makes is null.

nginx/apache vs nginx/php-fpm. Apache is actually very fast when it comes to processing php with mod_php. The difference of speed vs mod_php vs php-fpm is minuscule (in favor of mod_php). Then what's the benefit? Benefit is that apache sucks ****s at everything else. It takes huge amounts of inefficiently organized memory to serve static contents, it likes to hog all the ram to the point where the computer freezes, it's easily attacked (you can shut down most apache sites with a dos [single], not ddos without lot of bandwidth, without lot of pps), and etc. If you use php-fpm, basically lot of the part that apache sucks with is gone. But just by having nginx in front already handles a most of that. So, nginx/apache isn't that bad, but it still takes a whole lot more ram than php-fpm counter part. But, like I said, it makes things uber easy, especially since you still have .htaccess.

Posted

Most people can just get away with straight apache but if anything I would say go with apache proxy pass/nginx as it allows you the ease of .htaccess while allowing you to use the fast static serving of nginx. I've heard the new apache version is also ridiculously improved though I've not seen any IPB benchmarks yet.

Posted

Strictly as an opcode cache, I think APC is faster and more stable than XCache.

IPS also supports data caching through APC, XCache, or Memcached. Memcached is probably the fastest, and the cache can be shared by multiple servers.

If you decide to use only one server I would go with APC. It's nearly as fast as Memcached, and you can remove a layer of complexity (and potential failure) by using only APC for both caches.

Posted

yeah 5.4 was good, I had to go back to 5.3 until other stuff I use is fixed for 5.4 but it only running forum then 5.4 is good.
was some small changes to make but I had it running in 10 min or so.
using apc and images (and soon downloads) are using maxcdn, so far been working good for me.
7,401 Most Online that was using varnish as proxy, presently just apache as I make some changes.

Posted

Strictly as an opcode cache, I think APC is faster and more stable than XCache.



IPS also supports data caching through APC, XCache, or Memcached. Memcached is probably the fastest, and the cache can be shared by multiple servers.



If you decide to use only one server I would go with APC. It's nearly as fast as Memcached, and you can remove a layer of complexity (and potential failure) by using only APC for both caches.



APC is strictly faster than Memcached because apc doesn't have the tcp overhead. If you put memcached on a unix socket, memcached would have a chance. But if you go to multi-server system, you have little choice to use but memcached.

Interesting thread, I'm just about to do the same. Just to hijack it it little, what version of php do people recommend you run, 5.3 or 5.4?



I would recommend 5.3 only because 5.4 won't really be packed with OSes like centos. You'd have to get an OS that stays with the head quite avidly like ubuntu or make extra hassle just to get a less tested 5.4.

7,401 Most Online that was using varnish as proxy, presently just apache as I make some changes.



I really wonder about your 7401. It just doesn't seem right... The biggest forums like webhostingtalk.com doesn't get that much online. My forum maxed 5k online over 5min, and the number of posts I get in a day is about the number of total posts you have. Numbers just aren't adding up. This very forum maxed 2,413. But it appears to be lot more active.
Posted

it was a correct number, basically was a reaction to something some people did not like. screw 'em.
some of the the countries involved have been blocked now.
most online prior to that was 2200 or so, also a reaction.
I also do rush tests every other week or so with 250 or so per minute. apache alone seems to start to choke around 180 but I think I can tune that a bit.

Archived

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

  • Recently Browsing   0 members

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