Retry Policy and Exponential Backoff
Politica di Ritentativo ed Esponenziale Backoff
Una politica di ritentativo decide quali lavori falliti possono riprovare. Il backoff aggiunge un tempo di attesa più lungo dopo ogni fallimento.
Un altro esempio
Un servizio riceve un errore 503. Attende circa 1 secondo prima del secondo tentativo e circa 2 secondi prima del terzo tentativo. Il terzo tentativo funziona.
Parti principali
- 01Errore ritentabile
- 02Numero tentativo
- 03Ritardo in crescita
- 04Jitter
- 05Fermare il budget
Usalo quando
Usalo per brevi interruzioni di rete o di servizio quando ripetere il lavoro è sicuro.
Non usarlo quando
Non riprovare input errati o accesso negato. Per un pagamento, utilizza prima una chiave che prevenga l'addebito doppio.
Nome usato nel codice
retryable error + delay * 2 + jitter + attempt budget Prima di spedire
Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback.
Outcome: Complete the task with Politica di Ritentativo ed Esponenziale Backoff (Retry Policy and Exponential Backoff). User context: Un servizio riceve un errore 503. Attende circa 1 secondo prima del secondo tentativo e circa 2 secondi prima del terzo tentativo. Il terzo tentativo funziona. Technical concept or control: Politica di Ritentativo ed Esponenziale Backoff (Retry Policy and Exponential Backoff). Why it fits: Usalo per brevi interruzioni di rete o di servizio quando ripetere il lavoro è sicuro. Do not use it when: Non riprovare input errati o accesso negato. Per un pagamento, utilizza prima una chiave che prevenga l'addebito doppio. Engineering requirements: Define inputs, outputs, contracts, and rules that must always hold. Set authorization and input checks. Define failures, timeouts, retries, one-time effects, data moves, and compatibility limits. Operations: Add useful signals and logs that hide sensitive data. Set capacity limits and write an operator guide. Test recovery and rollback. Acceptance criteria: Contract and failure-path tests pass. Data and authorization rules still hold during retries and partial failures. Check performance limits, monitoring, recovery, and rollback. Evidence and limits (evidence boundary): Nessun singolo standard ufficiale controlla l'intero termine. Il suo significato può cambiare tra team, piattaforme o framework. Unknowns to confirm: Where the code runs, data stores, traffic shape, consistency needs, and the security boundary. Also confirm the compatibility period, service goals, and rollback limits.
Controlla questa richiesta
Review how Politica di Ritentativo ed Esponenziale Backoff (Retry Policy and Exponential Backoff) is used now. Definition: Una politica di ritentativo decide quali lavori falliti possono riprovare. Il backoff aggiunge un tempo di attesa più lungo dopo ogni fallimento. Release checks: Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback. Before changing code, list the evidence, gaps, severity, and the smallest safe fix.