Files
neon/proxy/src
Conrad Ludgate 2df3602a4b Add GC to http connection pool (#6196)
## Problem

HTTP connection pool will grow without being pruned

## Summary of changes

Remove connection clients from pools once idle, or once they exit.
Periodically clear pool shards.

GC Logic:

Each shard contains a hashmap of `Arc<EndpointPool>`s.
Each connection stores a `Weak<EndpointPool>`.

During a GC sweep, we take a random shard write lock, and check that if
any of the `Arc<EndpointPool>`s are unique (using `Arc::get_mut`).
- If they are unique, then we check that the endpoint-pool is empty, and
sweep if it is.
- If they are not unique, then the endpoint-pool is in active use and we
don't sweep.
- Idle connections will self-clear from the endpoint-pool after 5
minutes.

Technically, the uniqueness of the endpoint-pool should be enough to
consider it empty, but the connection count check is done for
completeness sake.
2023-12-21 12:00:10 +00:00
..
2023-10-25 15:43:03 +01:00
2023-12-18 10:59:49 +00:00
2023-11-27 21:45:15 +00:00
2023-12-18 10:59:49 +00:00
2023-12-18 10:59:49 +00:00
2023-12-18 10:59:49 +00:00
2023-12-18 10:59:49 +00:00
2023-11-06 17:44:44 +00:00
2023-08-31 14:30:25 +03:00
2023-12-18 10:59:49 +00:00
2023-11-27 21:45:15 +00:00
2022-07-04 23:46:37 +03:00