With this configuration we have a number of connections that are distributed across several hosts. This will give us a greater performance, distributing the cpu and i/o load between all the hosts. The problem with it is that we have to keep identical copies of the data on every host, so, while this setup is great for read only data, can't face itself data writes. The configuration would be the following:
daemon.reader-port=6666 daemon.writer-port=6666 daemon.host=localhost daemon.init-threads=5 daemon.min-threads=5 daemon.max-threads=30 daemon.init-db-connections=5 daemon.min-db-connections=5 daemon.max-db-connections=30 daemon.reaper-delay=1 daemon.user=daniel daemon.password=daniel daemon.auth-method=password machine.host=localhost machine.dbname=dbbalancer machine.port=5432 machine.dbuser=daniel machine.dbpassword=daniel machine.host=localhost machine.dbname=dbbalancer machine.port=5433 machine.dbuser=daniel machine.dbpassword=daniel
Here we can see, a setup in which the daemon has connections to two database instances running on the same host (we didn't have several hosts available, so this simulates that setup quite acceptable). The command used to start this configuration is ./DBBalancerDaemon -rf test/config_examples/LoadBalancerExample.conf