[id='configuring-hotrod-connection-pools_{context}']
= Configuring Connection Pools
Hot Rod Java clients keep pools of persistent connections to {brandname} servers to reuse TCP connections instead of creating them on each request.

.Procedure

* Configure Hot Rod client connection pool settings as in the following examples:

.ConfigurationBuilder
[source,java,options="nowrap",subs=attributes+,role="primary"]
----
include::code_examples/HotRodConnectionPools.java[]
----

.hotrod-client.properties
[source,options="nowrap",subs=attributes+,role="secondary"]
----
include::properties/hotrod-client-connection-pool.properties[]
----

These configuration options give fine-grained control over the pool.
We recommend tuning the pool according to the application needs.
Otherwise, you might experience an increase in latency for new connections opening or a decrease in throughput with few connections available.

A large pool could lead to a "herd effect" of new connections, given an abrupt increase in load.
However, it should help in throughput with more connections to attend requests.
A smaller pool avoids this effect and consumes fewer resources.
However, it can only handle so many requests before starting to degrade.
