Being able to control the depth of our connection pool is very useful. This will prevent us from overloading a database, but it's important to consider what it will mean in the context of timeouts. If you enforce both a set number of connections and strict context-based timeouts, as we did in this recipe, there will be cases where you'll have requests frequently timing out on an overloaded application trying to establish too many connections.
This is because connections will time-out waiting for a connection to become available. The newly added context functionality for database/sql makes it much simpler to have a shared timeout for the entire request, including the steps involved in performing the query.
With this and the other recipes, it makes sense to use a global config object to be passed into the Setup() function, although this recipe just uses environment variables.