0

Hypothetical scenario:

I have a database server that has significantly more RAM/CPU than could possibly be used in its current system. Connecting an application server to it, would I get better preformance using pooling to use multiple connections that each have smaller executions, or a single connection with a larger execution?

More importantly, why? I'm having trouble finding any reference material to pull me one way or the other.

Centimane
  • 280
  • 5
  • 17

1 Answers1

2

I always vote for connection pooling for a couple of reasons.

  • the pool layer will deal with failures and grabbing a working connection when you need it
  • you can service multiple requests concurrently by using different connections at the same time. a single connection will often block and queue up requests to the db
  • establishing a connection to a db is expensive - pools can do this up front and in the background as needed

There's also a handy discussion in this answer.

Community
  • 1
  • 1
NG.
  • 22,560
  • 5
  • 55
  • 61
  • But if the application server always remained connected to the database server wouldn't the benefits of connecting mostly disappear? – Centimane Jan 27 '14 at 12:54
  • how can you guarantee there are no network hiccups? Also, it still doesn't solve the concurrent request issue. – NG. Jan 27 '14 at 15:05