Chapter 2. Installation: The first steps

Table of Contents
Installation from a binary distribution
Installation from source

The installation of DBBalancer must not be very dificult, specially if we start with a precompiled binary.

Installation from a binary distribution

As every connection pool, DBBalancer pre-allocates several connections, saving the computationaly expensive work of allocating one connection for each execution of some code. This is specially useful in web applications, where usually there's little state persistence between a request and another. Depending on the patterns of use, there's a variable performance gain, being the biggest one for the typical connect-select-disconnect used in most dynamic web pages.

This pool has a variable number of connections and execution threads. The connection number should always be greater or equal than the thread number. The opposite would possible lead to client timeouts. These numbers vary on execution time, depending on the request queue size. Usually with a new thread is created a new db connection, and the reverse happens when a thread is destroyed.

This connection pool also recovers automatically the connections in the case of a database crash, excluding the connections from the pool while they're being recovered.