File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Connection Pooling: please help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Connection Pooling: please help" Watch "Connection Pooling: please help" New topic
Author

Connection Pooling: please help

Ashish Kothari
Ranch Hand

Joined: May 16, 2003
Posts: 37
I have question to ask ,I have made small shopping .
Now I want to use Connection Pool ,so How many connection should be active in Connection Pool at one time.
(suppose consider there are 100 users ,at one time,or less it might be 50,can one connection can serve only one request or more then )
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
When you come to the load testing phase of your application, you can measure how connection pool size affects throughput, latency and time to last byte. A typical database has a throughput plateau at around 10 concurrently executing statements, so that gives you a starting point -- obviously connections are rarely utilised 100% so the optimum number of connections is likely to be a tad higher. Keep in mind that the precise numbers vary. A lot. They depend on the database, the hardware, the physical database layout, the schema, and your software. Measurement is the only way to be sure.
- Peter
Ashish Kothari
Ranch Hand

Joined: May 16, 2003
Posts: 37
Dear Peter:
Thanks a lot,If I am using Ms-Access for back end ,if around 100 users(a small shopping cart application) are there ,would it be ok.I using JdbcOdbc bridge Driver.
or my database would be unable to respond that much of user.
where I can get more material,regarding load testing and conncetion pooling .
with regards.
Anil
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Originally posted by Ashish Kothari:
If I am using Ms-Access for back end
I thought you said you were using a database
if around 100 users(a small shopping cart application) are there ,would it be ok.
Do some loose math. Assuming a click every 10 seconds, 100 users would mean 10 requests/second, some of which may fire one or more database queries. On a transactional level, 100 concurrent users will, what, pick an item every 20 seconds to 20 minutes, depending on what you're selling. That's 0.5 to 5 transactions per second.
These numbers might push Access a bit, but that's on a completely un-optimised application. Catalog listings can be cached if necessary and contribute much less to the load that way. Shopping carts can simply be kept track of in the HttpSession. Only the payment transactions will remain, and their volume will be so small as to be negligible.
where I can get more material,regarding load testing and conncetion pooling.
Try The Bunkhouse for some good books.
- Peter
Ashish Kothari
Ranch Hand

Joined: May 16, 2003
Posts: 37
Dear Peter:
Thanks a lot,it was very importent to know this concept.
I would like to be in touch with you.
can you send write me yr email address.
mine is anilnahta@yahoo.com
Anil
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
You can send me email using the second little icon above this message, or private messages using the third icon. The only thing I ask is that if you have a question that might be of general interest, you ask it in the JavaRanch forums (mail me a pointer if you feel that is necessary).
- Peter
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connection Pooling: please help