Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace exponential backoff for outbound pool exhaustion #2084

Closed
adelphes opened this issue Sep 6, 2017 · 3 comments
Closed

Replace exponential backoff for outbound pool exhaustion #2084

adelphes opened this issue Sep 6, 2017 · 3 comments

Comments

@adelphes
Copy link

adelphes commented Sep 6, 2017

When the outbound connection pool is exhausted, additional outbound messages are held and delayed using the same exponential backoff rate (min 64 seconds, doubling each time) as a connection error.

When sending a batch of emails, this frequently leads to the pool going from completely used to completely available after a few seconds and then left idle, waiting for the timeout to expire before batch-sending again (causing the pool to be immediately exhausted again, longer backoffs, etc). This can potentially cause a very long delay (minutes) before messages are finally sent, even though the connection pool is mostly idle during this time.

Although a quick solution is to arbitrarily increase the maximum pool size, it would be much better for released pool connections to be made immediately available to any waiting outbound requests (the exponential backoff should really only apply to connection retries where we have actively attempted a connection to a server and don't want to be retrying for some time).

@msimerson
Copy link
Member

baudehlo mentioned on #haraka, simple-redis-safe-work-queue, as a potential solution. (Also mentioned: async.queue and QEWD.)

@msimerson
Copy link
Member

and bee-queue

@msimerson
Copy link
Member

Referenced and added to Outbound Improvements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants