Forum: NGINX nginx or apache for game

Posted by mottwsc (Guest)
on 2013-02-09 02:12
(Received via mailing list)
We are building a web based game on a LAMP stack, but it could just as 
well
be on a LEMP stack.  The game does not involve a lot of typical game 
stuff -
character movement, etc. - like in most video games.  Instead, it 
involves
some video clips and some html pages, with updates to content and chat
supplied primarily using Ajax and jQuery.  You can think of it like the 
app
'Are you smarter than a 5th grader', but this is an HTML5 web-based
application, not an app you download, and it has much more variety and
functionality.

I've read that nginx is much better for static web pages and that apache 
is
better for processing on the back end.  Can anyone provide some guidance 
as
to why it would be better to switch to nginx from apache for this type 
of
game application?

Thanks!

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,236033,236033#msg-236033
Posted by Tim Mensch (Guest)
on 2013-02-09 08:33
(Received via mailing list)
On 2/8/2013 6:11 PM, mottwsc wrote:
> I've read that nginx is much  better for static web pages and that
 > apache is better for processing on the back end.

I'm using OpenResty, and I would say that it gives me more performance
than Apache (as an app server) would in ANY configuration. Possibly by a
factor of 10-40, though I haven't actually done an apples-to-apples
benchmark -- and I'm also using LuaJIT now instead of PHP, so that's a
HUGE speed advantage by itself (Lua being the FASTEST dynamic language
around, and PHP being one of the slowest).

I've heard of people getting 70k+ concurrent connections per second
using Lua (or LuaJIT maybe) and OpenResty. My low-end VPS can't handle
that many connections, but it easily handles 3k+ connections per second,
including complex app logic.

YMMV.

Tim
Posted by mottwsc (Guest)
on 2013-02-10 15:16
(Received via mailing list)
At this point for the beta, I'm using PHP - could switch to something 
else
like Lua for a future production version.  My best course for right now
might be to use nginx on the front end and apache on the back end; could
extend nginx to OpenResty, and could possibly use Varnish as well.

Anyone with experience in these areas, please comment.

Thanks.

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,236033,236067#msg-236067
Posted by mex (Guest)
on 2013-02-11 09:19
(Received via mailing list)
tl;dr: yes :)

we run nginx as frontend (caching/loadbalancing/waf-functions via naxsi) 
in
front of different setups
(rails, tomcat, apache+php) and can recommend it, esp. the 
caching-function,
if used with caution,
might be integrated in parts of your application.

i'll give a talk on this topic on an oss-conference soon and will 
release a
paper with benchmarks
and different implementations of nginx as frontend-gateway.




regards, mex

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,236033,236071#msg-236071
Posted by Rainer Duffner (Guest)
on 2013-02-11 10:08
(Received via mailing list)
Am Mon, 11 Feb 2013 03:19:27 -0500
schrieb "mex" <nginx-forum@nginx.us>:

> and different implementations of nginx as frontend-gateway.
And which conference would that be?
Just out of curiosity?
;-)
Posted by mex (Guest)
on 2013-02-11 10:12
(Received via mailing list)
>
> And which conference would that be?
> Just out of curiosity?
> ;-)

cebit :)

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,236033,236074#msg-236074
Posted by Andre Jaenisch (Guest)
on 2013-02-11 14:14
(Received via mailing list)
2013/2/11 mex <nginx-forum@nginx.us>:
> i'll give a talk on this topic on an oss-conference soon and will release a 
paper with benchmarks
and different implementations of nginx as frontend-gateway.

Hello,
I would like to ask you to link the papers, when they're online. I'm
interested in reading them :)

Regards, André
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.