What's new

Speeding things up with Nginx

Martin

Active member
Administrator
I thought it was time for some upgrading and optimization. The big difference here is Nginx, you should notice that the pages load much faster now since most of the data is cached.

Added since before:

* Cache system using XCache v1.3.2
* Compressing pages with mod_deflate

What I've done so far:

* Upgraded to PHP 5.3.10 (latest)
* Upgraded GD-library (latest)
* Apache with reverse proxy Nginx (Major speed increase)

Planning to do:

* Activate CSS Sprites
* CSS files stored as files - done!
* Compressing Javascript
* Compressing CSS

So we're still using Apache as normally but all static pages are served through Nginx.
ginx is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server. Igor Sysoev started development of Nginx in 2002, with the first public release in 2004. Nginx now hosts nearly 12.18% (22.2M) of active sites across all domains. Nginx is known for its high performance, stability, rich feature set, simple configuration, and low resource consumption.

Nginx is one of a handful of servers written to address the C10K problem. Unlike traditional servers, Nginx doesn't rely on threads to handle requests. Instead it uses a much more scalable event-driven (asynchronous) architecture. This architecture uses small, but more importantly, predictable amounts of memory under load.
Even if you don't expect to handle thousands of simultaneous requests, you can still benefit from Nginx's high-performance and small memory footprint. Nginx scales in all directions: from the smallest VPS all the way up to clusters of servers.

Nginx powers several high-visibility sites, such as WordPress, Hulu, Github, Ohloh, SourceForge, WhitePages and TorrentReactor.​


http://wiki.nginx.org/Main
 

Attachments

  • benchmark.gif
    benchmark.gif
    16.9 KB · Views: 87

Toasty

Sony battery
Nice! We've been using nginx on another site I help out on (delegating PHP to Apache as well) and have been quite pleased with it there.
 
OP
Martin

Martin

Active member
Administrator
Yeah it's immensely fast. There are even faster options but they're expensive :(

Edit: Moved this out of the staff boards so everyone can see.
 
OP
Martin

Martin

Active member
Administrator
Next is Sphinx Search which I'll probably install tomorrow. I have already added it to DCEmu, it's sweet :)
 

Toasty

Sony battery
I'm not sure if it's related to the recent alterations or not, but has anyone else experienced a change in the "What's New?" link's behavior over the past few days? I always use the link when I visit, and it's always shown me the few threads that have had posts added since my last visit. Lately though, it will also display a long (one and a half pages long or so) list of other threads that have been updated recently -- but prior to my last visit. Fortunately the not-really-new posts are separated from the really-new posts by a header that says "The threads below have not been updated since your last visit but still contain unread posts." Am I alone in this?
 

smcd

Active member
@Toasty, yeah I got that too a few times - I'd already opened the posts but somehow they didn't get marked as having been read or something. Clicking the "Mark Forums Read" link seems to have stopped it - haven't had it happen again since.
 
OP
Martin

Martin

Active member
Administrator
I'm not sure if it's related to the recent alterations or not, but has anyone else experienced a change in the "What's New?" link's behavior over the past few days? I always use the link when I visit, and it's always shown me the few threads that have had posts added since my last visit. Lately though, it will also display a long (one and a half pages long or so) list of other threads that have been updated recently -- but prior to my last visit. Fortunately the not-really-new posts are separated from the really-new posts by a header that says "The threads below have not been updated since your last visit but still contain unread posts." Am I alone in this?

Actually that's because I changed so that the new posts would be stored in the database instead of a cookie, as per vBulletin's recommendations. Perhaps better to go back and store in cookie then? But then you don't see the correct new posts when visiting from another computer/phone/etc since you have a different cookie on that.
 

Toasty

Sony battery
Oh do whatever's recommended; storing it in the DB makes more sense anyways. ;) I applied smcd's advice and I've only seen one 'un-new' post in the results since then (but that may be correct behavior if the thread was updated during my previous visit), so I think the issue may be solved at least for me. So did the additional threads just show up because the DB had not yet been 'informed' that I'd visited since their being updated (which was subsequently resolved when I marked the forums as read)?
 

Top