Resilience: hbf-client-integrations
Error handling and retry patterns for this service. Platform-wide patterns:
docs/architecture/resilience.md
HTTP Retry
- Library: got with retry enabled for GET, POST, PUT, PATCH, DELETE
- Attempts: 3 (got default)
- Backoff: Exponential with jitter (got default, not explicitly configured)
- On failure:
HttpExceptionthrown with status code; 409 CONFLICT treated as non-fatal inpost()
Queue Retry (if applicable)
N/A
Timeouts
| Call | Timeout | Configured in |
|---|---|---|
| General requests | DISTRIBUTER_SERVICE_REQUEST_TIMEOUT env var or 5000ms fallback | Environment config |
| Client module requests | DISTRIBUTER_SERVICE_REQUEST_TIMEOUT env var or 15000ms fallback | Environment config |
| kelly-hbf-interaction | 60000ms (60s) | Hardcoded |
| getBuffer() | No timeout | N/A |
Circuit Breakers
None.
Fallback Strategy
| Failure scenario | Behaviour | User impact |
|---|---|---|
| HTTP error | HttpException thrown with upstream status code | Error propagated to caller |
| 409 CONFLICT on POST | Treated as non-fatal, request continues | No user impact |
Known Gaps
- No timeout on
getBuffer()calls (may hang indefinitely on large payloads). - Backoff configuration relies on got defaults without explicit tuning.
- No circuit breaker across 15+ client services in
/distributor/clients/. - No DLQ for failed requests.
- No health endpoint.