View Single Post
Old 09-02-2014, 08:28 AM  
Jel
Confirmed User
 
Jel's Avatar
 
Industry Role:
Join Date: Feb 2007
Posts: 6,904
Quote:
Originally Posted by TROLLENSTEIN View Post
Well nginx is, in simple terms, a great solution to an old problem that plagued Apache (pre Apache 2.4.xx), and still does even after 2.4.xx. Namely, speed. Apache slows down under heavy load, because of its need to spawn new processes/threads to handle each new connection, thus consuming more and more server memory. It also creates new threads that must compete with others for access to server memory and CPU. Basically, this means there was an upper limit to how many connections (connections + CPU load + memory use = slooooow) that an Apache-based server could handle before it simply started to refuse new connections as it ran out of server resources. So you can tell this would be a big, big problem for heavy traffic websites. The old solution was to simply throw more servers at the problem to "fix" it, and many still do this right up to today. So nginx was developed to overcome this problem, and it does it with very, very good success. It handles server connections in a vastly more efficient way than Apache, the major difference is the threads that nginx uses/creates to handle server connections can handle many, many 1000s of connections each without the need to spawn more server processes so it uses vastly less CPU/memory resources, which in turn keeps the server chugging along nicely under loads that would crippled an older Apache server (pre Apache 2.4.xx).

So as to how nginx can benefit you it really depends on what type of sites you run, how much traffic you are getting, and your growth projections. If you have a simple blog network that does a few 1000 uniques a day a single decent budget box with Apache will handle that fine. But if you have a 1MIL+/uniques a day tube site you're obviously going to be looking at ways to make your site respond as fast as possible without costing more than you earn, and using nginx as a base (with caching on top like Varnish, etc, of course!) can help out a lot. So, in my opinion, it's a much better base to build off than Apache if you are going for a big site.

1. Should I be using it to deliver streaming video?

Depends on your site and how you want to handle the streams. If it's a normal blog/tgp/whatever, and just using affiliate content, then Apache will stream in HTTP/RTMP just fine. If it's a popular site, or you are growing it, then nginx is a better solution than Apache for doing this simply as KT above says it will reduce server loads/needs/specs (as it's much, much more efficient than Apache).

2. If so is it something I can say to my hosting company: I want nginx?

If you're on managed hosting then you can ask them to install for nginx for you, no problem. If your managing your own server you can install, compile, configure and deploy nginx in a matter of minutes. Best to read up on what bits/addons you want to build into nginx beforehand, of course.

3. Do I need to do anything my end other than upload videos as normal?

Nope, nothing. Most of your videos (I'm assuming here, so forgive me if I'm wrong!) will be streaming via HTTP at the moment, nginx handles progressive downloads the same as Apache.

Hope this helps.
perfect, thanks mate that is much appreciated
Jel is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote