Generally only multithreaded apps need multiple connections. It's theoretically possible for a single-threaded app to make use of multiple connections but there probably isn't a good reason for that.
The main benefit of a connection pool is to keep database connections for re-use, to minimise the overhead of setting up new database connections. This can matter in a typical request-per-connection scenario like rails where each request may result in just one or a few database queries. Then the connection setup becomes a significant portion of the request time.
But it's a bit of a PITA to set up a proper connection pooling system. You have connection timeouts and cleanups to worry about. Check the ActiveRecord connection pooling code for an example.
You can defer having to worry about connection pooling by creating an using the right interface. It would go something like
class MyConnection
def self.get1(args)
# establish a connection and return it
end
def close
# close the connection
end
end
Or maybe
def use_connection
connection = nil
begin
connection = open_a_connection
yield connection
ensure
connection and connection.close
end
end
And then you can make the interface more sophisticated later on, without having to touch the rest of the app.