Commit a8684d7
committed
As per celery#5605, the Consul backend does not cleanly associate responses
from Consul with the outbound Celery request that caused it. This leaves
it prone to mistaking the (final) response from an operation N as the
response to an (early) part of operation N + 1.
This changes fix that by using a separate connection for each request.
That of course has the downside of (a) being relatively expensive and (b)
increasing the rate of connection requests into Consul:
- The former is annoying, but at least the backend works reliably.
- The latter can cause Consul to reject excessive connection attempt, but
if it does, at least it returns a clear indication of this (IIRC, it
responds with an HTTP 429"too many connections" indication).
Additionally, this issue can be ameliorated by enabling retries in the
python-consul2 (which I believe should be turned on regards less to handle
transient network issues). This is fixed by the PR in
https:/github.com/poppyred/python-consul2/pull/31.
Note that we have never seen (b) outside a test specifically trying to hammer
the system, but we see (a) all the time in our normal system tests.1 parent 117cd9c commit a8684d7
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
52 | 56 | | |
53 | 57 | | |
54 | 58 | | |
| |||
0 commit comments