Skip to content

[Idea] Add retry + exponential backoff + circuit breaker around ORS calls #50

@sfc-gh-obielov

Description

@sfc-gh-obielov

Triage note (2026-04-23): Part of the ORS client hardening epic alongside #51 (request-size guardrails) and #56 (per-endpoint latency + error log).

Epic ordering hint: #56 must land first — the ORS_REQUEST_LOG table it creates is the input signal this ticket's circuit breaker reads to decide when to open/close. Without #56 this ticket would need to invent its own observability plumbing. After #56, this ticket's breaker thresholds can be tuned against real p50/p95/error-rate data instead of guessed constants.


Context

The public ORS service has been hit by repeated 503s from load-balancer issues, acknowledged The public ORS service has been hit by repeated 503s from load-balancer issues, acknowledged The public ORS service has been hit by repeated 503s from load-balancer issues, acknowledged The public ORS service has been hit by repeated 503s from load-balancer issues, acknowledged The public ORS service has been hit by repeated 503s from load-balancer issues, acknowledged The public ORS service has been hit by repeated 503s from rix avoid_polygons is silently ignored](https://ask.openrouteservice.org/t/avoid-polygons-not-working-with-matrix-api-for-multiple-locations/) for large payloads. Our UDFs/notebooks can hammer the internal service unbounded.

Proposal

  • Reject Matrix calls above maximum_routes_flexible.
  • Reject Isochrones beyond configured range/interval limits.
  • Validate avoid_polygons shape and surface a warning if dropped.
  • Return structured 4xx-style errors instead of silent success.

Benefit

Prevents silent failures and protects the shared SPCS service from a runaway caller.

References

Metadata

Metadata

Labels

ideaProposed improvement or exploration

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions