You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After an Endpoint is acquired, the Endpoint is used as a key to a ConnectionPool for the endpoint.
Map<Endpoint, ConnectionPool> pools = newConcurrentHashMap<>();
ConnectionPoolpool = pools.get(ctx.endpoint());
Connectionconnection = pool.acquire(ctx);
if (connection == null) {
// create a new connection using Bootstrap and add it to the connection pool
}
I will do more PoC on a separate branch and leave feedback on whether this proposal is possible without making significant changes to the current implementation.
ConnectionPool.maxNumConnections()
will limit the maximum connection more intuitively thanmaxNumEventLoopsPerEndpoint
.maxNumEventLoopsPerEndpoint
on Discord channels and how to control the maximum number of connections.LoadBalancer<Connection, ClientRequestContext>
may be used to pick a connection in a connection pool.LoadBalancer
to pick a connection that has the least requests could be implemented later.Endpoint
is acquired, theEndpoint
is used as a key to aConnectionPool
for the endpoint.I will do more PoC on a separate branch and leave feedback on whether this proposal is possible without making significant changes to the current implementation.
Ref: #5779 (comment)
The text was updated successfully, but these errors were encountered: