locked
Object Pooling and Connection Pooling RRS feed

  • Question

  • User1904516115 posted

    There is any difference between Object Pooling and Connection Pooling?

    Saturday, January 9, 2021 4:48 PM

All replies

  • User475983607 posted

    Keep in mind you are asking for definition which are easily found by reading the documentation or doing a quick Google search   An connection pool an object pool that contains connections.

    https://en.wikipedia.org/wiki/Connection_pool

    https://en.wikipedia.org/wiki/Object_pool_pattern

    Saturday, January 9, 2021 4:56 PM
  • User1904516115 posted

    Both looks very similar

    Saturday, January 9, 2021 5:06 PM
  • User1535942433 posted

    Hi vinodkpasi,

    Object Pooling:

    Object Pooling is something that tries to keep a pool of objects in memory to be re-used later and hence it will reduce the load of object creation to a great extent.

    It lets you control the number of connections you use.In this case the pool will decide whether the maximum is reached or not for creation of objects. When the maximum is reached, it makes the client wait until an object is returned to the pool, and then gives the newly returned object to the waiting client.The drawback is, it increases the time complexity for heavy objects. 

    Connection pooling:

    Connection pooling is process of taking a connection from a pool of connections, once connection is created in the pool any application can re-use that connection.You control the maximum number reached.

    More details,you could refer to below articles:

    http://www.c-sharpcorner.com/UploadFile/chinnasrihari/3973/

    http://www.c-sharpcorner.com/UploadFile/munnamax/connectionpooling08112007062332AM/connectionpooling.aspx

    Best regards,

    Yijing Sun

    Monday, January 11, 2021 2:21 AM