reqwest icon indicating copy to clipboard operation
reqwest copied to clipboard

[feat request] Allow to configure number of connections in connection pool when build a client

Open gftea opened this issue 1 year ago • 3 comments

At present, it seems no way to adjust the connection pool size, wonder if this can be added?

gftea avatar Sep 16 '24 15:09 gftea

Are you specifically asking about a maximum number of connections in the pool?

droundy avatar Sep 24 '24 19:09 droundy

Yes.

gftea avatar Sep 24 '24 21:09 gftea

Chiming in here to say +1.

We have an application that makes requests to many different downstream hosts and we observe memory usage growing until we stop calling new endpoints.

We are sometimes able to reuse connections within the idle timeout so we would rather not disable connection caching entirely. Some way to bound the number of connections to keep in the pool overall would be very helpful.

RobMor avatar Sep 25 '24 17:09 RobMor