Nginx or apache for game

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

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

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

Am Mon, 11 Feb 2013 03:19:27 -0500
schrieb “mex” [email protected]:

and different implementations of nginx as frontend-gateway.
And which conference would that be?
Just out of curiosity?
:wink:

tl;dr: yes :slight_smile:

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

2013/2/11 mex [email protected]:

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 :slight_smile:

Regards, André

And which conference would that be?
Just out of curiosity?
:wink:

cebit :slight_smile:

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,236033,236074#msg-236074

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs