Status
Not open for further replies.

kiladila

Active Member
479
2009
9
0
Good evening, have little problem with Nginx configuration. I'm using it for script who streaming data to user from another server, so it's like proxy. But this action requires lot of CPU time. I have almost default Nginx configuration, it works with fast-cgi, i wonder maybe some one know something about tweaking Nginx for streaming/proxy?
 
40 comments
I quit using NGinx, Apache is just as good if configured and optimize the correct way.

@ kuzukuzu

If you we're using it on an WHM/cPanel web server NGinx does not update traffic/bandwidth graphcs correctly
 
@DLow none optimization will help you when talking about 10k+ visitors per day (public leech server). Maybe i will try Apache but i dont think so it will handle better then nginx.
 
The issue is not necesrilly nginx, but the php interpriter you're using. When you say its running a 'script' I assume you mean via php.

I run a site that recieves over 150,000 UV/day. It runs nginx + php-fpm (the interpriter) and then apc to cache opcode.

I'd suggest you try fpm before switching back to the almighty resouse hog known as apache.
 
kiladila

IMGCafe gets about 12 K a day :p and uses near 17 TB of bandwidth monthly :p But you have to know it also depends on port speed, sever specifications and of course the Data Centers network
 
Well i'm using 1.3TB daily, so....
Server is i7 8 Core, 12GB of ram...

CPU load is about 170% from 800% i dont know is that normal or not...maybe it can be optimized some how.
 
Not bad at all which control panel do you run ? DA, CP ?

also hows the network at your data center ?
 
I'm using only ssh mate. Data center is OVH, i know i know now you tell me that this suck but anyway i'm sing it and i satisfy.
 
Nginx will fail really hard with dynamic load. It's designed to handle load from static files.

You're streaming data which effectively means there's script interaction at some point. That's where nginx tends to fail, hard. And I say that from experience. I used to run a public leech server too. And nginx failed in a few hours. I switched back to optimized Apache, and I was good to go!
 
As I explained before, its not nginx thats the problem, its what your using to interpret php FOR nginx. An optimized apache setup will probably work, but if you're actually serving content from the server, then I'd stick with nginx. As I said before, why not give php-fpm a go?

On the other hand, you could have the best of both worlds. Use nginx to serve static content and have it proxy to apache for anything dynamic.

Just my two cents.
 
lol, nginx kills apache mod_php easily.
Nginx will fail really hard with dynamic load. It's designed to handle load from static files.

You're streaming data which effectively means there's script interaction at some point. That's where nginx tends to fail, hard. And I say that from experience. I used to run a public leech server too. And nginx failed in a few hours. I switched back to optimized Apache, and I was good to go!
 
"Nginx" not good for dynamic contents. even if you run it as a front end proxy with apache backend, it will cause access problems. at many places only port 80,443 is open.

a well optimized apache with prefork mpm is good.
 
Please tell if streaming data is DINAMIC or STATIC content? If we using simple rapidleech with schema: FILE HOST >> SERVER >> USER i think that we serving static content (only files), but in my situation i'm streaming files directly via proxy script, so this is dynamic content then?
 
Nginx pawns all.. thats why is was buit , ( to handle c10k problem -- > it can handle 10 k concurrent connection at same time on medium hardware with default config)
if you are looking for a reverse proxy,. try varnish ..
 
"Nginx" not good for dynamic contents. even if you run it as a front end proxy with apache backend, it will cause access problems. at many places only port 80,443 is open.

a well optimized apache with prefork mpm is good.
Show me one benchmark where mpm prefork beats apache under a decent load (atleast 10 req/s, although im sure it would beat it under that) and I will eat my hat.


Please tell if streaming data is DINAMIC or STATIC content? If we using simple rapidleech with schema: FILE HOST >> SERVER >> USER i think that we serving static content (only files), but in my situation i'm streaming files directly via proxy script, so this is dynamic content then?
Streaming static files definately used nginx, if you are serving large files try directio, else ensure sendfile is on.
If files are never read twice then compiling nginx with aio (asyncronous IO) will give a performance increase howeaver if not dont worry (AIO skips file caching)
 
Status
Not open for further replies.
Back
Top