[Zope] multiple Zope connections to the same database within different branches

J Cameron Cooper jccooper@jcameroncooper.com
Wed, 23 Jul 2003 14:31:01 -0500


>
>
>I'm just curious, if you've got two connections to the same database in 2 different branches at the same level, is it better to put
>those 2 connections in the 'trunk' of those two branches.
>
>Is there performance reasons to do so/ not to do so?
>  
>
Three considerations:

1) space. You're using more than necessary with connections on siblings. 
However, this is a *very* small amount of space. Basically irrelevant.

2) future-proofing. Are you likely to want other siblings to have the 
same setup? If so, this will become annoying when you have to add 
connections manually rather than allowing acquisition to do it 
automatically. Probably irrelevant.

3) connection pooling. Some DAs use connection pooling to optimize for 
speed. Having muliple connections to the same database means that you'll 
have more connections than necessary (and possibly too many, if you have 
a lot) and that they won't be optimally used.

I can't think of any good reason to have multiple connections to the 
same database, except maybe to throw errors in code that gets relocated 
somewhere naughty. You're best off with only one.

          --jcc