Current time: 11-16-2024, 10:27 AM Hello There, Guest! (LoginRegister)


Post Reply 
Devide Static and Dynamic Content
Author Message
HappyAlex Offline
Junior Member
*

Posts: 11
Joined: Jan 2007
Reputation: 0
Post: #1
Devide Static and Dynamic Content
and one day i met very bad situation...huge loading in my apache Sad
and i thinking about .. using nginx (like httpd daemon) for serve static (avi.mp3,jpg, gif and etc) and php,cgi by apache
i make some changes on
vhcs-als-mng
vhcs-sub-mng
vhcs-dmn-mng

if anyone intresting in this ... i can put step by step
05-01-2007 12:24 AM
Find all posts by this user Quote this message in a reply
xister Offline
Member
*
Beta Team

Posts: 405
Joined: Oct 2006
Reputation: 6
Post: #2
RE: Devide Static and Dynamic Content
Sorry, we support no vhcs!!

We´re only support ispCP.
For vhcs support, please contact the vhcs forum!
05-01-2007 12:28 AM
Find all posts by this user Quote this message in a reply
HappyAlex Offline
Junior Member
*

Posts: 11
Joined: Jan 2007
Reputation: 0
Post: #3
RE: Devide Static and Dynamic Content
xister
sorry for my English, but i think you did not understand me
ok ..
when you host avi,mp3 and etc files on your servers... it's good
but when users try to downloading it .. it makes huge loading in apache...apache makes childs and eating memory and CPU Sad i met this problems....and get solution to unload apache with nginx .. right now my apache works only with php and cgi...
with files like mp3, avi, jpg, gif and etc... working nginx...
right now i'm using this schema on two production servers and everything is ok
(This post was last modified: 05-01-2007 12:35 AM by HappyAlex.)
05-01-2007 12:34 AM
Find all posts by this user Quote this message in a reply
xister Offline
Member
*
Beta Team

Posts: 405
Joined: Oct 2006
Reputation: 6
Post: #4
RE: Devide Static and Dynamic Content
ahhh ok, i missunderstood your first post a little bit, sorry Wink
05-01-2007 12:48 AM
Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #5
RE: Devide Static and Dynamic Content
That means that Apache und ngnix runs at the same time on your system ?
Did you only change the Ports or what ?

I will test a avi or mp3 download these days on my Server with Apache2 and give a report.
05-01-2007 01:51 AM
Visit this user's website Find all posts by this user Quote this message in a reply
ephigenie Offline
Project Leader
*******
Administrators

Posts: 1,578
Joined: Oct 2006
Reputation: 15
Post: #6
RE: Devide Static and Dynamic Content
Hm i know nginx and lighttpd are both very perfomant,
but for static files are both (nginx + lighttpd + apache2.2.x) able to max out a 100Mbit line easily.

Maybe not with mpm-prefok but Big Grin
Instead of the old & crap vhcs we can use mpm-worker or mpm-event & both of them are blazing fast (compared to 1.3.x & 2.0.x speed) .

So from my point of view a mixed mode setup makes not that much sense.
Because you've to take into account the overhead nginx/lighttpd's mod_proxy loads on every dynamic request.

Btw. do you mean the single-threaded -event-driven smart webservers in front or behind the apache ?

Something else which is by far more interesting would be a complete switch to lightty/nginx. But i has to regret that this is atm only hardly possible.
Thats caused by the lack of modularity and therefore the poor possibilities with our current template driven modell.

So a complete lighttpd / nginx support instead of apache is possible (perhaps with some limitations but... ) But that is planned to be supported in a later version.
Though perhaps we can build together a way to support a switch now between apache/proxy->nginx/lighttpd or pure apache or pure lighttpd/nginx.
What do you mean ?
05-01-2007 04:56 AM
Visit this user's website Find all posts by this user Quote this message in a reply
raphael Offline
Member
***

Posts: 474
Joined: Apr 2007
Reputation: 8
Post: #7
RE: Devide Static and Dynamic Content
I would say using lighttpd as the external listener. By the way, this is interesting: http://trac.lighttpd.net/trac/wiki/Docs%3AModProxyCore
05-01-2007 08:08 AM
Visit this user's website Find all posts by this user Quote this message in a reply
ephigenie Offline
Project Leader
*******
Administrators

Posts: 1,578
Joined: Oct 2006
Reputation: 15
Post: #8
RE: Devide Static and Dynamic Content
yes the idea is nice & copied a bit from the apache 2.2 concept of doing proxying Wink

one core "router" and surrounded by plugins which control routing and plugins supporting different protocols Wink

Hm but i'm still not sure that lighttpd is that much faster on static files than apache - event (that one can even be linked against libaio and so on ) so it's able, too to do non-blocking io and all those nice things. ( you know even apache2.2 can max out a 100mbit line with a 500Mhz cpu - the difference is only visible, when you're going to let your 1000mbit line burn (you run a torrent tracker ? Big Grin )

The real difference is the fastcgi implementation. That's really damn fast.
And the low memory footprint of course. So in the end its less ressource intensiv as apache is. But regarding only the speed of static files I'm not quite sure if you'll get a big difference there. (But a total changed setup does for sure! )
05-01-2007 08:37 AM
Visit this user's website Find all posts by this user Quote this message in a reply
HappyAlex Offline
Junior Member
*

Posts: 11
Joined: Jan 2007
Reputation: 0
Post: #9
RE: Devide Static and Dynamic Content
nginx/lighthttpd - this is front end
apache is backend
i'm using mpm-worker apache and saw one thing..when users try download avi.mp3 ..apache makes childs and get more RAM and CPU it's not good
so .. i decide to use for this (downloading files - only) nginx (lighthttpd - without any modules )
05-01-2007 01:03 PM
Find all posts by this user Quote this message in a reply
solars Offline
Newbie
*

Posts: 5
Joined: Feb 2007
Reputation: 0
Post: #10
RE: Devide Static and Dynamic Content
I'm planning to do some similar setup on a server, Nginx in the front, Apache in the backend.
Here is an example if anyone is interested, its german, but the main part is the config anyways: http://www.nginx.de/NginxToApache

My reason for doing this is because I think about isp-control as a nice hosting control for some of my older users and their php site.

The main reason though is that I mainly want to host Rails applications, and nginx is the best choice for this in my opinion.

I'm not sure how to setup the whole server, so any suggestions/discussion if someone did something similar, is appreciated.
And of course, isp-control support towards a lighter server would be really cool Smile

edit: when trying to use nginx with isp-control, does anyone know what problems this could cause or causes? and why?
(This post was last modified: 05-04-2007 07:28 PM by solars.)
05-04-2007 07:23 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 3 Guest(s)