FlowDSL
Studio
Spec

RetryPolicy Reference

Complete field reference for the RetryPolicy object in FlowDSL.

A retry policy is nested inside a delivery policy and configures what the runtime does when a node handler returns a retriable error.

Fields

FieldTypeRequiredDefaultDescription
maxAttemptsinteger (1–10)YesTotal delivery attempts including the first.
backoffstringYesBackoff strategy: "fixed", "linear", or "exponential"
initialDelayISO 8601 durationYesDelay before the first retry.
maxDelayISO 8601 durationNoNo limitMaximum delay between retries.
jitterbooleanNofalseAdd ±20% random variance to prevent retry storms.
retryOnarray of stringNoAll errorsError codes to retry on.

retryOn error codes

CodeMeaning
TIMEOUTNode handler timed out
RATE_LIMITEDExternal API returned rate limit error
TEMPORARYTransient failure (e.g., connection refused)
NETWORK_ERRORNetwork connectivity failure

Non-listed errors (VALIDATION, PERMANENT) always go to dead letter without retry, regardless of retryOn.

Backoff strategies

Fixed

yaml
retryPolicy:
  maxAttempts: 3
  backoff: fixed
  initialDelay: PT5S

Retry timing: wait 5s → wait 5s → dead letter

Linear

yaml
retryPolicy:
  maxAttempts: 4
  backoff: linear
  initialDelay: PT2S
  maxDelay: PT10S

Retry timing: wait 2s → wait 4s → wait 6s (capped 10s) → dead letter

Exponential

yaml
retryPolicy:
  maxAttempts: 5
  backoff: exponential
  initialDelay: PT1S
  maxDelay: PT60S
  jitter: true
  retryOn: [RATE_LIMITED, TIMEOUT, TEMPORARY]

Retry timing (with jitter): wait ~1s → wait ~2s → wait ~4s → wait ~8s → dead letter

Complete LLM retry policy example

yaml
edges:
  - from: PreparePrompt
    to: LlmSummarize
    delivery:
      mode: durable
      packet: PromptPayload
      idempotencyKey: "{{payload.documentId}}-summarize"
      retryPolicy:
        maxAttempts: 3
        backoff: exponential
        initialDelay: PT5S
        maxDelay: PT120S
        jitter: true
        retryOn: [RATE_LIMITED, TIMEOUT]

Complete payment retry policy example

yaml
edges:
  - from: ValidateOrder
    to: ChargePayment
    delivery:
      mode: durable
      packet: ValidatedOrder
      idempotencyKey: "{{payload.orderId}}-charge"
      retryPolicy:
        maxAttempts: 3
        backoff: fixed
        initialDelay: PT5S
        retryOn: [TIMEOUT, NETWORK_ERROR]

Fixed retry for payments: predictable, no exponential explosion, stops quickly so the customer doesn't wait too long.

Next steps

Copyright © 2026