> On Jul 31, 2020, at 12:33 PM, Wietse Venema <wie...@porcupine.org> wrote:
> 
>> No, you *do not* want to do that.  That can increase connection
>> concurrency beyond your process limit, in the form of idle connections
>> that have a different nexthop than the one to which you're currently
>> delivering email.
> 
> We could fix these excess connections by grouping cached connections
> by transport, and by evicting a cached connection for some transport
> if a requested connection for that transport is not found.
> 
> It's not optimal from a reuse point of view, but it ensures that
> one transport cannot exceed the number of connections determined
> by its process limit.

This simple eviction policy may be too aggressive, if two destinations
are each creating new cached connections, each may evict the cached
connection(s) for the other.

There should likely be a configurable per-transport limit on the
connection cache occupancy, so that eviction only happens when
the limit is reached.  The default limit might be a small multiple
of the transport destination concurrency, and users can raise or
lower that as needed on per-transport basis.

-- 
        Viktor.

Reply via email to