tomcat - Is connection pooling the best way for running many instances of an applications on a single server (with MySQL)? -


i want config tomcat server mysql 5.1 community edition (on win server 2008 x64) run big project on single machine. i've gwt application , need run more 300 instances of on single hp server.

each instance uses separate mysql db (db1 db300) & need separate connection pool, part of connection pool configuration db1 (similar other dbs):

<resource name="jdbc/mysql/db1" auth="container" type="javax.sql.datasource" initialsize="5" maxactive="100" maxidle="20" maxwait="30000" removeabandoned="true" removeabandonedtimeout="5" validationquery="select now();" .../> 

for 300 instances number of active connection 300*100 = 30000 active connections!

now want know if possible open such huge number of connections 300 mysql databases on single server.

if no, what's solution , if yes how resources (ram , cpu) used?

is connection pooling best way or there way?

if connection pooling best choice best setting resource section create pools?

the number of active connections 30000 if every single 1 of 300 instances needed use 100 @ time. if they're idle they'd using somewhere between 1500 (from initialsize) , 6000 (from maxidle) based on configuration. you'll want lower these values handle 300 instances. perhaps initialsize="2" maxactive="10" maxidle="5" sufficient?

if expect instances using many connections 1 server not enough. it's impossible how ram or cpu you'll need though, depends on you're doing , how activity expect.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -