very fast stateless web server for serving dynamic pages using postgresql

2,274 views
Skip to first unread message

jerome lafon

unread,
Oct 16, 2013, 10:29:09 AM10/16/13
to framework-...@googlegroups.com
Hello,

I am looking for a very fast stateless web server for serving dynamic pages using postgresql.
In addition I will use a Key value store like REDIS for caching the HTML.
The web server doe not have to manage a context, a session or a state for each connection but it needs to be able to serve a lot of requests per second as fast as possible and if possible without the need of a lot of memory.
Currently my frontend webserver is Nginx which transfer the requests to G-WAN to serve the requests using some C code, so it's pretty fast and not consuming a lot of memory but I wanna take some information on another solution because G-GAN crashes every day at around midnight for an unknown reason. 
It's not as stable as I expect for a production web server.
I am potentially interested by vert.x, CPPSP, HipHop Virtual Machine for PHP.
I would prefer coding in C/C++ or Java or eventually in PHP.

Jerome

Brian Hauer

unread,
Oct 16, 2013, 10:54:33 AM10/16/13
to framework-...@googlegroups.com
Hi Jerome,

Given your scenario description and the languages you are comfortable with, I think the options you are evaluating sound right.

If you are comfortable developing your web application in C++, cpoll_cppsp is presently king of the hill in our performance tests.  I personally don't trust my C++ skills sufficiently to tackle such a challenge, but it sounds as if you are up to it.

On the Java side, you can't go wrong with a Netty-based framework like Vert.x.  That said, you may also want to take a look at Undertow, the new web server that will be the basis of WildFly, which is JBoss Application Server 8.  I am quite fond of the Undertow native API—it's fluent, clean, brief (for Java), and easy for me to understand.

We don't yet have performance measurements for HipHop+PHP.  I am optimistic that we'll eventually receive a pull request that includes HipHop, but for the time being that remains an unknown to me.  I have no reason to doubt Facebook's claims, but I'd like to be able to see how it stacks up in our tests.

I hope this helps!

jerome lafon

unread,
Oct 16, 2013, 12:09:42 PM10/16/13
to framework-...@googlegroups.com
Thank you for your reply.
CPPSP seems to be a good option for me.
I have already coded in C for G-WAN so I would have to adapt my code but the logical part is already defined.

What does it mean cpoll_cppsp? Is it a way to implement the web server application?

Jerome

jerome lafon

unread,
Oct 16, 2013, 12:24:57 PM10/16/13
to framework-...@googlegroups.com
Do you think CPPSP isenough mature to be use in production?
Otherwise vert.x seems very promising also and perhaps a little bit more mature but I believe the memory usage will be really bigger than with a C/C++ server.

Brian Hauer

unread,
Oct 16, 2013, 12:49:51 PM10/16/13
to framework-...@googlegroups.com
Hi Jerome,

I personally have not used CPPSP (as I implied earlier).  But the developer has contributed here in the past and I believe he would consider it production-ready.  I leave it to you and others to debate whether you feel it's sufficiently production-ready for your use-case.

In terms of adoption, something like Vert.x has seen a modest amount of production usage.  Popularity-wise, I would say it's a second-tier framework (where first-tier are easily recognizable names like Rails, Django, and Spring).  Second-tier may be a sweet-spot.  It means there is enough community support to help you through tough spots but there's not as much history and cruft to weigh down the framework.

Memory usage of a Java application server will most likely be greater than a decently-tuned C++ application.  I'm not sure what kind of memory constraints you have, however.  Are you working with several gigabytes of data?  If not, I'm not sure the memory situation is worth worrying about.

jerome lafon

unread,
Oct 16, 2013, 3:44:04 PM10/16/13
to framework-...@googlegroups.com
Thanks for your very interesting reply.
I care about memory usage because I use only one VM for hosting all the application (nginx, php, postgresql, g-wan, REDIS...).
Later I will separate these applications on several servers but currently I don't.

Jérôme Lafon

unread,
Oct 19, 2013, 2:07:44 PM10/19/13
to framework-...@googlegroups.com

I just discovered openresty which seems very promising. Do you have any feedback on it?

Regards
Jerome

--
You received this message because you are subscribed to a topic in the Google Groups "framework-benchmarks" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/framework-benchmarks/BmJLlaz5yq8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to framework-benchm...@googlegroups.com.
Visit this group at http://groups.google.com/group/framework-benchmarks.
For more options, visit https://groups.google.com/groups/opt_out.

me

unread,
Oct 24, 2013, 10:03:30 AM10/24/13
to framework-...@googlegroups.com
OpenResty easy to learn and build on projects. One limitation is I have to stop and restart OpenResty each time I made changes to the Lua code, not sure if that was the way instead of hot reload. If that is, this will definitely slow down our productivity significantly.
To unsubscribe from this group and all its topics, send an email to framework-benchmarks+unsub...@googlegroups.com.

HEATHER RAFFAELLA Riverso

unread,
Dec 12, 2014, 5:51:24 AM12/12/14
to framework-...@googlegroups.com
Hello Brian,
I am not a web developer neather software engeneer but I have some project in implementing C++ in my magento shoping cart code for better performance and wanted to use cpoll_cppsp,
my question is; is cpoll_cppsp just a webserver just like HipHop+PHP or is it a webserver and a code to implement, integrate inside a php application???

As I want to customise my magento extensions from php tp c++ I am more kind of intrested to use cpoll_cppsp in my php code such as for a lybrary for instance rather then using a web server,
could you please clarify the points above,
regards, Heather


Le mercredi 16 octobre 2013 16:54:33 UTC+2, Brian Hauer a écrit :
Reply all
Reply to author
Forward
0 new messages