Disclaimer: Used AI agent to diagnose the issue and write this report
Summary
With Trickster 2.0.4 (91f547433698f221094e03def7d9503c49d9d358), a TSM ALB query can wait until the caller’s timeout and return 502 when the fanout contains a mix of successful and non-2xx downstream responses.
The same PromQL succeeds when sent directly to healthy pool members. Downstream responses complete quickly, indicating that most of the delay occurs in Trickster’s fanout/gather path.
Setup
- Trickster 2.0.4
- Prometheus-compatible TSM ALB
- Instant PromQL query
- Large multi-backend pool
- Mixed downstream results, including HTTP 200 and HTTP 401
Observed behavior
-
The TSM request produces no response headers before the client’s 90-second timeout.
-
The caller receives 502.
-
(CORRECTION: please disregard this line which was my mistake in testing) In one reproduction, a failing member returned HTTP 401 with no org id in approximately 0.2 seconds, while a working member returned HTTP 200 in approximately 0.34 seconds.
-
Despite these downstream responses completing quickly, the TSM request waited until the client timeout.
-
Representative Trickster logs include:
vector unmarshaling error
tsm gather merge failure: no timerange query
tsm gather failed due to nil func
Expected behavior
A failed or non-2xx pool member should not hold the entire TSM request until the client deadline.
If at least one member returns usable data, Trickster should return a bounded partial response with warnings. If no member contributes usable data, it should return an error promptly.
Related issue
This appears related to #1040 / #1041, but that fix is already included in the tested commit and seems focused on proxy-only/cache-range responses. The remaining case appears to involve instant queries with mixed successful and non-2xx member responses.
Disclaimer: Used AI agent to diagnose the issue and write this report
Summary
With Trickster 2.0.4 (
91f547433698f221094e03def7d9503c49d9d358), a TSM ALB query can wait until the caller’s timeout and return 502 when the fanout contains a mix of successful and non-2xx downstream responses.The same PromQL succeeds when sent directly to healthy pool members. Downstream responses complete quickly, indicating that most of the delay occurs in Trickster’s fanout/gather path.
Setup
Observed behavior
The TSM request produces no response headers before the client’s 90-second timeout.
The caller receives 502.
(CORRECTION: please disregard this line which was my mistake in testing) In one reproduction, a failing member returned HTTP 401 with
no org idin approximately 0.2 seconds, while a working member returned HTTP 200 in approximately 0.34 seconds.Despite these downstream responses completing quickly, the TSM request waited until the client timeout.
Representative Trickster logs include:
vector unmarshaling errortsm gather merge failure: no timerange querytsm gather failed due to nil funcExpected behavior
A failed or non-2xx pool member should not hold the entire TSM request until the client deadline.
If at least one member returns usable data, Trickster should return a bounded partial response with warnings. If no member contributes usable data, it should return an error promptly.
Related issue
This appears related to #1040 / #1041, but that fix is already included in the tested commit and seems focused on proxy-only/cache-range responses. The remaining case appears to involve instant queries with mixed successful and non-2xx member responses.