Product: lbpool - Load Balancing JDBC Pool

Todd Hoff's picture

From the website:

The lbpool project provides a load balancing JDBC driver for use with DB connection pools. It wraps a normal JDBC driver providing reconnect semantics in the event of additional hardware availability, partial system failure, or uneven load distribution. It also evenly distributes all new connections among slave DB servers in a given pool. Each time connect() is called it will attempt to use the best server with the least system load.


The biggest scalability issue with large applications that are mostly READ bound is the number of transactions per second that the disks in your cluster can handle. You can generally solve this in two ways.

1. Buy bigger and faster disks with expensive RAID controllers.
2. Buy CHEAP hardware on CHEAP disks but lots of machines.

We prefer the cheap hardware approach and lbpool allows you to do this.

Even if you *did* manage to use cheap hardware most load balancing hardware is expensive, requires a redundant balancer (if it were to fail), and seldom has native support for MySQL.

The lbpool driver addresses all these needs.

The original solution was designed for use within MySQL replication clusters. This generally involves a master server handling all writes with a series of slaves which handle all reads. In this situation we could have hundreds of slaves and lbpool would load balance queries among the boxes. If you need more read performance just buy more boxes.

If any of them fail it won't hurt your application because lbpool will simply block for a few seconds and move your queries over to a new production server.

In this post Kevin Burton of Spinn3r mentions they've been using this product to good effect for handling MySQL replication faults, balancing, and crashed servers.

Comments

Re: Product: lbpool - Load Balancing JDBC Pool

Thanks for the link.

I've been trying to get MySQL to incorporate this into the NATIVE MySQL driver as it's a LOT better than the stock ReplicationDriver. To date they've haven't found the spare cycles to incorporate it :-/

Re: Product: lbpool - Load Balancing JDBC Pool

You can buy many small, fast disks with an inexpensive raid controller (compared to SAN's) like the Dell MB3000 where you could get some serious read speed from a RAID 10 set of 45 discs.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd><div ?=?><p ?=?> <img ?=?><h1 ?=?><h2 ?=?><h3 ?=?>
  • Lines and paragraphs break automatically.
  • Glossary terms will be automatically marked with links to their descriptions
  • You may link to webpages through the weblinks registry

More information about formatting options

To combat spam, please enter the code in the image.