Deployment: Play! server versus Apache Tomcat

1,549 views
Skip to first unread message

David Marko

unread,
Oct 26, 2009, 5:28:59 AM10/26/09
to play-framework
Hello,
I have a question on deployment. Lets say we have 10-15 apps in Play.
Is more effective to run each app(on the same computer) with 'play
run' with some Apache/Lighttpd(as documentation describes) or using
Tomcat container? The 'more effective' means, if Apache Mina is less
memory(resource) hungry so if it is better to run these as separate
apps or under container.

Thanks,
David

Guillaume Bort

unread,
Oct 26, 2009, 6:22:12 AM10/26/09
to play-fr...@googlegroups.com
Basically a small play app will work fine with a java heap a 32Mo. The
footprint of the framework itself is pretty low (almost 4~5 Mo). But
the memory consumed by a JVM is not only the Java Heap. It will use a
lot of native memory as well. So I guess that 10 JVM will consume much
memory than a big one running tomcat + 10 play apps.

However in terms of performance you should have serious gain using
play directly. The network stack of play (based with mina) is way more
faster than the tomcat one. Moreover it allows some unique features
like long polling. And 10 java heaps of 32Mo will be easier to manage
for the garbage collector than a big 512Mo one.

Our advice will be to run each application in a standalone way using
the built-in HTTP server if possible.

bao sun

unread,
Oct 31, 2009, 11:02:02 AM10/31/09
to play-framework
Guillaume,

the performance is not the only issue in a business production.
monitoring and management ability also very important.

build-in server maybe the faster one,but tomcat/jboss,etc has more
features needed at another point of view.

Guillaume Bort

unread,
Oct 31, 2009, 11:37:28 AM10/31/09
to play-fr...@googlegroups.com, play-framework
Which monitoring/management feature would you like to see in play
standalone ?

Daniel Guryca

unread,
Oct 31, 2009, 11:51:05 AM10/31/09
to play-fr...@googlegroups.com
Hmm I am interested too.
How about Jconsole - JMX monitoring features ?

Daniel

Guillaume Bort

unread,
Oct 31, 2009, 11:54:58 AM10/31/09
to play-fr...@googlegroups.com
JMX will work without the need of any container. However we don't have yet defined any intersting MBean for the framework itself. You will find the standard ones (memory, ...). And your application can provide some as well. 

bao sun

unread,
Nov 1, 2009, 12:05:51 AM11/1/09
to play-framework
we use jboss as app server.

for developer:

jboss has a jmx-console , there are many tools for example:

1)check memory usage, print heap stack, display memory allocate in
different generations.
2)check thread pool status
3)reload configure , redeploy app , etc.

for our operation Team:
1) jboss has a snmp service to easy integrate with cacti , snmp liked
monitor tools. They care about cpu,memory,io,network usages for
monitor purpose.

but, to develop a full-stack JMX MBeans need more work to do. I
don't think Play should be that way. just smart, lightweight like now.
a module implement snmp and some little jvm status info does enough.






On Oct 31, 11:54 pm, Guillaume Bort <guillaume.b...@gmail.com> wrote:
> JMX will work without the need of any container. However we don't have  
> yet defined any intersting MBean for the framework itself. You will  
> find the standard ones (memory, ...). And your application can provide  
> some as well.
>
> On 31 oct. 2009, at 16:51, Daniel Guryca <dun...@gmail.com> wrote:
>
> > Hmm I am interested too.
> > How about Jconsole - JMX monitoring features ?
>
> > Daniel
>
> > On Sat, Oct 31, 2009 at 4:37 PM, Guillaume Bort <guillaume.b...@gmail.com
> > > wrote:
>
> > Which monitoring/management feature would you like to see in play
> > standalone ?
>

grandfatha

unread,
Nov 1, 2009, 7:39:43 AM11/1/09
to play-framework
I dont see a reason why you shouldnt be able to connect to the "play-
run"-VMs using something like VisualVM to inspect all of that pretty
easily.

Daniel Guryca

unread,
Nov 1, 2009, 8:46:45 AM11/1/09
to play-fr...@googlegroups.com
I'm back.

Yes anyone can use jvm mbean server but it would be useful to be able to set all these nice things directly via application.conf.
As you could utilize id support and set different mbean server ports for different deployments and enviroments.

Cheers
Daniel

Guillaume Bort

unread,
Nov 1, 2009, 2:17:41 PM11/1/09
to play-fr...@googlegroups.com
Yes there isn't something specific to JBoss
Reply all
Reply to author
Forward
0 new messages