# Request Replay & Clock Skew Correction for Distributed Systems

Parse a raw HTTP request or curl command, estimate client↔server clock skew from the response Date header (NTP-style midpoint formula), inspect timestamp credentials (X-Amz-Date, x-ms-date, X-Timestamp, JWT iat/nbf), replay with ±skew offsets and diff the results against real tolerance windows (AWS SigV4 ±15 min, Azure, OAuth, JWT leeway).

> Canonical page: https://elysiatools.com/en/tools/request-replay-clock-skew-correction-distributed-systems

- **Category:** Network

- **Keywords:** clock skew, request replay, date header, jwt nbf, requesttimetoooskewed, curl replay

## Overview

Request Replay & Clock Skew Correction diagnoses and corrects timestamp drift issues in distributed API requests by parsing raw HTTP payloads or curl commands. It calculates client-to-server clock skew using response Date headers and NTP-style midpoint formulas, inspects credentials like AWS SigV4, Azure headers, and JWT claims, and evaluates them against protocol tolerance windows or re-executes requests with calibrated time offsets.

## Inputs

- **Raw HTTP request or curl command** (textarea): POST /v1/orders HTTP/1.1 Host: api.example.com X-Amz-Date: 20260824T093000Z Authorization: Bearer eyJhbGciOi... Content-Type: application/json {"sku": "A-1"}
- **Mode** (select)
- **Captured response Date header (analyze)** (text): Mon, 24 Aug 2026 09:30:12 GMT
- **Local clock when it arrived (analyze)** (text): Mon, 24 Aug 2026 09:30:02 GMT (defaults to now)
- **Replay offsets in seconds (empty = auto)** (text): e.g. -950,0 or leave empty for the auto ±skew sweep
- **Timeout per request (ms)** (number)

## When to use

- Debugging API authorization failures caused by clock skew, such as AWS RequestTimeTooSkewed or premature JWT nbf/iat rejections.
- Analyzing captured HTTP logs or curl snippets offline to determine exact client-server clock offset and protocol tolerance status.
- Testing API robustness and tolerance windows across distributed services by replaying requests with customized ±skew second offsets.

## How it works

- Paste a raw HTTP request or curl command containing authentication headers or signed payloads into the primary input.
- Select offline analysis mode with captured response Date and local arrival timestamps, or select live replay mode to execute requests directly.
- The tool parses headers (e.g., X-Amz-Date, x-ms-date, X-Timestamp, JWT claims), calculates clock skew intervals, and compares them to standard tolerance thresholds.
- Review the diagnostic report, inspected timestamp claims, and corrected curl commands adjusted for server clock offsets.

## Use cases

- Diagnosing AWS SigV4 RequestTimeTooSkewed errors from containerized workloads running on un-synchronized host clocks.
- Verifying JWT token validity windows (iat/nbf/exp claims) across microservices located in different cloud regions.
- Sweeping request replay offsets against webhooks and distributed APIs to validate anti-replay and clock-drift tolerance boundaries.

## Frequently asked questions

### How is client-to-server clock skew calculated?

It uses an NTP-style midpoint estimation comparing the server's response Date header against the local timestamp recorded at request transmission and receipt.

### Which authentication timestamp formats and headers are inspected?

It inspects AWS SigV4 (X-Amz-Date / Date), Azure REST headers (x-ms-date), generic X-Timestamp headers, and JWT payload claims (iat, nbf, exp).

### Can JWT tokens be modified during live replay?

No. JWT claims are cryptographically signed, so modifying timestamps on the wire invalidates the token signature unless re-signed by the issuer.

### What is the standard AWS SigV4 clock skew tolerance limit?

AWS SigV4 allows a maximum drift of ±15 minutes (900 seconds) between the request timestamp and the server's authoritative clock.

### What is the difference between analyze and replay modes?

Analyze mode computes skew and inspects claims entirely offline, while replay mode sends active HTTP requests across specified ±skew second offsets.

## Related tools

- [Time Series Forecast & Seasonality Analyzer](https://elysiatools.com/en/tools/time-series-forecast-seasonality-analyzer): Forecast future periods from CSV or JSON time-series data and inspect trend, seasonal, and residual decomposition in one report
- [JWK Generator & Parser](https://elysiatools.com/en/tools/jwk-generator): Generate JSON Web Keys (JWK) for RSA, EC (P-256/P-384/P-521/secp256k1), and OKP (Ed25519/Ed448/X25519/X448), or parse an existing JWK to inspect its parameters, thumbprint, and metadata
- [Security Headers Checker](https://elysiatools.com/en/tools/security-headers-checker): Audit HTTP response headers for security compliance — parses the raw headers you paste (no network) and grades them against the OWASP secure-header set with value-level checks: HSTS max-age, CSP unsafe-inline/eval, X-Content-Type-Options, Referrer-Policy, Permissions-Policy, COOP/COEP/CORP and more. Outputs a letter grade (A+ to F) plus per-header findings with copy-ready fix recommendations.
- [Date Extractor (日期提取器)](https://elysiatools.com/en/tools/date-extractor): Extract dates from text in multiple formats including Chinese, ISO, and US formats with detailed analysis and summary
- [Webhook Debugger & Relay](https://elysiatools.com/en/tools/webhook-debugger-relay): Generate a unique webhook capture URL, inspect incoming requests, validate signatures, and replay payloads to a target endpoint
- [Cron Expression Next Run](https://elysiatools.com/en/tools/cron-expression-next-run): Parse cron and show the next run in natural language, local time, UTC, countdown seconds, and Unix timestamps.
- [Currency Exchange Calculator](https://elysiatools.com/en/tools/currency-exchange): Convert an amount between currencies using live exchange rates from a free, no-key API (open.er-api.com). Supports 160+ world currencies. Shows the converted amount, the exchange rate used, a comparison table against popular currencies, and the rate update timestamp.
- [Galactic / Equatorial Coordinate Converter](https://elysiatools.com/en/tools/galactic-coordinate-converter): Convert astronomical positions between equatorial (RA/Dec J2000 and B1950), galactic (l/b), and supergalactic (SGL/SGB) coordinate systems. Accurate J2000 IAU 1958 galactic rotation, de Vaucouleurs supergalactic system, and IAU 1976 precession between epochs. Accepts sexagesimal (12h51m26s) or decimal-degree input and shows all four systems for each object.

## Samples

- [Distributed Systems Patterns Samples](https://elysiatools.com/en/samples/distributed-systems): Comprehensive distributed systems patterns covering consistency, consensus algorithms, sharding, and fault tolerance mechanisms
- [Distributed Tracing Samples](https://elysiatools.com/en/samples/distributed-tracing-samples): Comprehensive distributed tracing examples using Jaeger, OpenTelemetry, and other modern observability tools for microservices architecture
- [Web Image Processing Python Samples](https://elysiatools.com/en/samples/web-image-processing-python): Web Python image processing examples using PIL/Pillow including reading, saving, resizing, and format conversion
- [Copyright-Free FLAC Audio Samples](https://elysiatools.com/en/samples/flac-samples): Lossless FLAC audio samples for testing and development, mirrored from MP3 set with nature sounds and meditation music

## Related content

- [Audio Encoding and Format Conversion Tools](https://elysiatools.com/en/hubs/audio-convert): Compare audio format conversion, bitrate changes, sample-rate conversion, codec swaps, and export tools in one hub for delivery and archive workflows.
- [Image Format Conversion and Animated Export Tools](https://elysiatools.com/en/hubs/image-convert): Compare image format converters for JPG, PNG, GIF, AVIF, WebP, TIFF, ICO, base64, and animation-friendly exports in one hub.
- [JSON Interchange and Format Translation Tools](https://elysiatools.com/en/hubs/json-convert): Compare JSON conversion tools for CSV, YAML, TOML, GraphQL, XML, Markdown, Excel, BSON, EDN, and related structured formats in one hub.
- [Color Space Conversion Tools for Web and Print](https://elysiatools.com/en/hubs/design-convert): Curated tools for web-to-print color space conversion in one hub.
