Connection pooling concepts
Most modern systems include multiple databases, especially when microservices architectures are implemented. This makes the concept of connection pooling a critical component of efficient Java applications.
Microservices architecture
Microservices are independent components of a software system tied to a specific business function. They often have their own database so they can be decoupled from the main application and updated independently of other microservices.
The key issue is that software applications need to connect to databases and those connections draw on system resources. The concept of connection pooling is to establish a connection to the required databases and when they are no longer in use, return them to a pool. Obtaining a connection from a pool is quicker and less resource intensive than creating new connections every time a database operation is required.
The following illustration shows the process of connection pooling,...