mysql connection opening time

C++, C#, Java, PHP, ect...
Post Reply
User avatar
PaxBritannia
Posts: 680
Joined: Sun Apr 18, 2010 1:54 pm

mysql connection opening time

Post by PaxBritannia »

Since the website I'm working on has several databases on several servers, I need to connect to them. All. Individually.

Is there significant overhead in opening and closing around 10 connectons per page? How about 60 connections per page?

pax.
User avatar
Chris
Posts: 1580
Joined: Wed Sep 30, 2009 7:22 pm

Re: mysql connection opening time

Post by Chris »

Might make a few milliseconds difference but not much as long as the servers aren't too remote or slow.
Fighting for peace is declaring war on war. If you want peace be peaceful.
User avatar
PaxBritannia
Posts: 680
Joined: Sun Apr 18, 2010 1:54 pm

Re: mysql connection opening time

Post by PaxBritannia »

Thats good to know. Else my data architecture would have been doomed.

Pax.

-----UPDATE-----

Yay me!

Session database successfully sharded!

Avg. connections per authentication: 1! :D
Avg. connections per login: 3! :)
Avg. connections per signup: 7! :|

Now to shard everything else!

The connections are going to be around 1 per item in the 'galleryview' of the site. If you view 60 items at a time, thats at least 65 connections a page! :shock:

pax.
Post Reply

Return to “Coding”