DocumentationBuild. Deploy. Operate.
DocsOperation

POST During Outage

On this page 5 sections

QSCS will never replay a POST (or any other state-changing method) from its cache, that would corrupt your application data. While an upstream is degraded, QSCS short-circuits write requests with a deterministic "soft-fail" response, so that well-behaved clients can retry safely later.

What the client sees

HTTP/1.1 503 Service Unavailable
X-QSCS-Mode: headless
X-QSCS-Headless-Reason: post_soft_fail
Content-Type: application/json
Content-Length: …

{
  "error":  "upstream_unavailable",
  "retry":  true,
  "reason": "origin_degraded",
  "host":   "example.com",
  "uri":    "/api/checkout"
}

The body is always JSON and always contains the same five fields. Application code can rely on the shape.

Why this is better than a generic 502

The soft-fail response says three useful things at once:

  1. This was QSCS, not your origin. The headers X-QSCS-Mode: headless and X-QSCS-Headless-Reason: post_soft_fail make that unambiguous.
  2. Retrying later will succeed. "retry": true tells well-behaved clients (mobile apps, queues) to back off and try again rather than alerting the user.
  3. The original request was never sent upstream. So nothing was half-applied.

What clients should do

Client typeRecommended behaviour
Browser appShow a non-scary "Saving…" message; retry the request after a small delay; surface a generic error only if multiple retries fail.
Mobile appQueue the request locally with exponential backoff. Most outages clear within a minute or two.
Server-to-serverHonour the JSON contract: parse retry; on true, requeue with backoff. On false (rare), treat as a fatal upstream failure.

Idempotency notes

QSCS does not de-duplicate retries, that is your application's responsibility. If your write endpoints are not idempotent, consider attaching a client-generated request ID and ignoring duplicate IDs server-side.

Tuning the trigger

The degraded state is entered after two consecutive upstream failures and cleared after two consecutive successful probes. These thresholds are fixed in the current release and tuned to avoid both flapping and slow detection.

Need a hand with your deployment?Contact support ↗Back to top ↑