Connection Pooling

Image Source: javaworld.com

Database connection pooling is already supported by Ruby on Rails 2.2! Basically, connection pooling occurs when several of the database connections are kept open and they are all ready for queries. And when Rails gets an HTTP request and queries the database, what it does is, it gets an open database connection from the several connections that are currently open. it then goes on with its query. After it has made its query, it automatically returns the connection to the pool. The connection pooling enables the user to have a better control over interaction in the database. And it boosts performance because Rails does not connect to the database every request. Without this feature, the surging search requests in the database can slow down the over all connection.

This entry was posted in Basics. Bookmark the permalink. Comments are closed, but you can leave a trackback: Trackback URL.