Connection pool
From Wikipedia, the free encyclopedia
In software engineering, a connection pool is a cache of database connections maintained by the database so that the connections can be reused when the database receives future requests for data.
Connection pools are used to enhance the performance of executing commands on a database. Opening and maintaining a database connection for each user, especially requests made to a dynamic database-driven website application, is costly and leads to wastage of resources. In connection pooling, after a connection is created, it is placed in the pool and it is used over again so that a new connection does not have to be established. If all the connections are being used, a new connection is made and is added to the pool. Connection pooling also cuts down on the amount of time a user must wait to establish a connection to the database.
[edit] Applications
Connection pooling being normally used in web-based and enterprise applications is usually handled by an application server. Any dynamic web page can be coded to open a connection and close it normally but behind the scenes when a new connection is requested, one is returned from the connection pool maintained by the application server. Similarly, when a connection is closed it is actually returned to the connection pool. Connection pooling was first introduced in Microsoft Internet Information Server 3,[citation needed] the idea was soon after incorporated into other software vendors web server products.
Connection pooling is not limited to using application servers. Traditional applications that need frequent access to databases can benefit from connection pooling as well. This was traditionally handled by manually maintaining database connections, but as expected, that meant very well-crafted programming as the framework for pooling is highly complex. In recent years, things have become a lot easier due to availability third-party libraries that allow connection pooling as well as SQL statement pooling, thus giving high performance in database intensive applications.
Various parameters such as number of minimum connections, maximum connections and idle connections can be set to make sure the connection pool works well according to the environment it is deployed to work in.
확실하게 해석한지는 잘모르겠지만.. Connection Pool이라는 것은 데이터베이스에 한번 접근하고 끊는 것이 아니라 필요할때마다 연결을 가지고와서 쓰고 다시 돌려주는 형태이다. 이것은 처음 DB를 접속하는 과정에서 과부하가 가장 크기 때문에 나온기술이다. 하지만 Pool을 너무크게 해놓으면 메모리의 소모가 크고 너무 적으면 대기 시간이 길어지므로 웹사이트에 걸리는 부하에 따라 조절하는 것이 필요하다.
[출처] Connection Pool? (Surprise You!) |작성자 란돌
'DataBase' 카테고리의 다른 글
[DB] varchar 2000바이트 입력오류 (0) | 2011.08.10 |
---|---|
[DB] Oracle - DB사이즈 확인 (0) | 2011.03.08 |
[Mssql] 클라이언트 다운 (0) | 2011.02.21 |
[DB] Oracle SQL Developer 에서 msssql연결하기 (0) | 2011.02.21 |
[MySql] 한글 인코딩 (0) | 2010.09.09 |