retry_exponential_backoff

Installation
SKILL.md

retry_exponential_backoff

Implementación de retry con backoff exponencial y jitter para manejar errores transitorios (5xx, timeouts) en las comunicaciones entre el gateway y los servicios downstream.

When to use

Usar en el api_gateway_agent para reintentar automáticamente peticiones fallidas a servicios downstream. Solo reintentar errores transitorios (502, 503, 504), nunca errores de cliente (4xx).

Instructions

  1. Configurar en Nginx upstream:
    proxy_next_upstream error timeout http_502 http_503 http_504;
    proxy_next_upstream_tries 3;
    proxy_next_upstream_timeout 5s;
    
  2. Para lógica avanzada con Lua, implementar backoff exponencial:
    local delay = math.min(base_delay * 2^attempt, max_delay)
    
Related skills
Installs
14
First Seen
Mar 3, 2026