Send to a Friend

Wilhelm's avatar

2 Concurrent Database Connections Per User Versus ...

Asked by Wilhelm (69points) August 23rd, 2007

I'm a PHP developer at the company I work at and we're going through a major transition from Sybase to MySql Enterprise.

One of our requirements is to have an initial database connection to a server designated 'slave'. When our database abstraction layer encounters a command that is either an INSERT, UPDATE, DELETE or CALL to a stored procedure, we need to use a different server designated 'master'.

Now, my question is, what are the pros as cons as far as performance and overhead between closing connection from server A and opening a connection to server B OR just having 2 persistent connections to both servers at the same time and just switch between them accordingly?

Right now we're doing the former method and I'm a little worried about performance issues because this is a VERY HIGH VOLUME network of sites that use these servers.

Any insight would be appreciated!

Using Fluther

or

Using Email

Separate multiple emails with commas.
We’ll only use these emails for this message.