TTL Lock Expired: How a Fencing Token Stops an Old Worker
On a safe model, we show why lease expiration does not stop an old process and how a monotonic fencing token prevents it from overwriting the new owner's result.
Аккаунт в General iT
Войдите или создайте аккаунт для управления услугами в личном кабинете.
Страны не найдены. Попробуйте другое название или код.
Practical tips and verified solutions for Linux, servers and websites.
On a safe model, we show why lease expiration does not stop an old process and how a monotonic fencing token prevents it from overwriting the new owner's result.
Check every element of the batch response: detect missing results, avoid resubmitting successful SKUs, and safely resume only temporarily failed operations.
Practical guide to circuit breaker: three technical failures trip the breaker, requests stop reaching the external API, a failed probe extends the pause, and a successful one restores normal operation.
We analyze a replay attack on a correctly signed webhook: signing the timestamp and nonce, verifying the time window, and showing why worker local memory loses protection after a restart.
On a deterministic model, we compare local and shared token buckets: two workers receive four 429 responses with local limits, while a single shared limiter distributes eight requests without exceeding the limit.
On the tested model, we compare the change in product quantity against a record of its absolute value. A single operation_id prevents the same command from being applied twice, while version checking rejects stale snapshots after new product movements.
On an isolated SQLite model, we check the retry limit, move persistent errors to a dead-letter queue, handle rollback on failure between insert and delete, and perform a single return of the corrected message.
We examine the transactional outbox using a safe model: the order and outgoing event are recorded in a single transaction; failures before and after sending do not lose the event, and retries use a stable event_id.
We examine single-flight for OAuth: one request updates the access and refresh tokens, others wait for the result, and a token endpoint error does not corrupt the saved pair.
Before reloading, extract the public key from both the certificate and the private key, compare their SHA-256 hashes, and handle read errors separately. Tested with OpenSSL 3.0.13: a matching pair, a different pair, and a damaged file.
Practical guide: accept K1 and K2 only within a limited window, bind the signature to key_id and timestamp, verify HMAC via compare_digest, and disable the old key based on seven test results.
Check a complete candidate unit with systemd-analyze verify and interpret exit codes, a misspelled directive, a missing executable, and a missing dependency, without daemon-reload or starting the service.
A practical guide for OpenSSL 3.0: distinguishing trust anchors from intermediates, reproducing errors 20, 2, and 62, reading depth, and separately verifying the DNS name.
Page 1 of 6