Let’s suppose; you are an engineering student. You’d have several exams for eight semesters. For each semester there would be N number of exams. For the preparation of those exams, you need books. Some people will find it difficult to buy those books because those books are very expensive. So, those people will borrow books from the library, and after the semester they will return those books to the library.Library uses those books to serve other people. Here, the books are the objects. The books are getting reused. Instead of buying the books we are trying to get books from the library. After the books are returned, the library representative will reuse those books. The library representative will serve many people.
If there are N number of clients, nearly thousand clients who try to create a database connection pool.
If you create one database connection pool itself is a costly object because it involves an N number of resources. If those thousand clients are creating a similar kind of object means, then the expense would be 1000x.
So instead we’ll reuse the object that is already created by someone. That’s called “Reusable Pool”. This reusable pool will try to create some object, some limited object, it will try to manage the clients.
Let’s consider if suppose if four clients ask for that object, this “Reusable Pool” will try to serve those four clients.
This reusable object pool acts as the manager for the objects.
It will try to get the used objects from the client, and then it will pass those objects to the clients who are expected to get those objects, that’s the power of this reusable tool.