[Labs-l] Accessing the databases from labs - A comparison with the toolserver
Tim Landscheidt
tim at tim-landscheidt.de
Wed Jul 17 18:06:52 UTC 2013
"Brad Jorsch (Anomie)" <bjorsch at wikimedia.org> wrote:
>> That may be true if you only want to connect to one wiki's databasse. But
> what
>> if you want to connect to all of them, one ofter the other, or maybe just
> a
>> handful, as needed?
> Keep a hash/dict/assoc/map of IP address to db connection, and reuse the
> existing connection if you already have one for that IP?
That would require a) that you do the name resolution your-
self, and b) that MySQL never introduces something like
HTTP/1.1's Host header/Labs never sets up a central DB proxy
that relays the connections based on database names.
I really don't think that we should encourage such low-level
programming. If developers want to cache/group DB connec-
tions and there is a super simple way to do so that has been
proven to be working for some years now, I'm much more
inclined to replicate that compared to almost anything else,
especially if it is more complicated :-).
Tim
More information about the Labs-l
mailing list