Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

database pooling

by chorg (Monk)
on Apr 25, 2001 at 00:54 UTC ( [id://75264]=perlquestion: print w/replies, xml ) Need Help??

chorg has asked for the wisdom of the Perl Monks concerning the following question:

I am working in a load balanced /clustered environment. However, there is only one db server.

Because I like to put my data where it is safe(ish) I tend to put lots of stuff in db tables, since that is where the data is anyway...

This of course defeats clustering, because it makes the db machine (NFS mounted) the bottleneck.

SO...

I'm looking into trying to cluster the databases - that is to use multiple cheap dbs to handle some of the load. Anyone have any tips about how to go abt doing that? I'll need an algorithim to sync the db's somehow, but I'd love to get perhaps a different view on the problem...
_______________________________________________
"Intelligence is a tool used achieve goals, however goals are not always chosen wisely..."

Replies are listed 'Best First'.
Re: database pooling
by tinman (Curate) on Apr 25, 2001 at 01:03 UTC

    My take on this:

    You didn't mention if this was a write intensive or read intensive clustered application.. For a read intensive cluster app (such as a search engine, maybe), small localized dbs might be just the trick..

    I've done a similar thing, although that was because the client couldn't afford the Oracle licensing fees for a big machine.. put in small local mysql databases on each cluster machine, and then updated through cron every night..

    Another somewhat unrelated solution to this is the venerable Squid, working in reverse proxy (httpd acceleration) mode.. again, in a read-intensive environment, serving cached content is far far more effective than multiple servers..

    For a write intensive environment though, I might think about partitioning the tables after a careful analysis of the write patterns.. ie: the table x and table y get most of the writes, so put them on separate HDs, or even separate DB servers... My opinion though, NFS is probably not such a good idea if you really want good write performance.. haven't really seen stunningly fast NFS drives (of course, I'm sure I haven't seen really good NFS configs, so this hardly counts)
    HTH

Re: database pooling
by arturo (Vicar) on Apr 25, 2001 at 01:01 UTC

    Here's suspecting that either your DBMS supplies a load-balancing / mirroring utility, or you're better of switching your DBMS than trying to write one from scratch.

    In the realm of free DBMSen, MySQL now does DB replication. This should not be taken as an endorsement thereof. But poke around on your candidate DB sites.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://75264]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-04-19 21:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found