{"product_id":"n8n-webhook-proxy-for-adaptive-api-rate-limiting-with-redis","title":"n8n Webhook Proxy for Adaptive API Rate Limiting with Redis","description":"\u003ch3\u003eAdaptive n8n Webhook Proxy with Redis Rate Limiting (Auto-Backoff + Throttling)\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow exposes a webhook that safely proxies approved API calls to upstream services while enforcing per-service rate limits stored in Redis—dynamically adjusting limits using upstream \u003cem\u003e429\u003c\/em\u003e\/\u003cem\u003eRetry-After\u003c\/em\u003e and \u003cem\u003eX-RateLimit-*\u003c\/em\u003e headers, and optionally delaying requests when callers run over budget.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives requests via webhook:\u003c\/strong\u003e Accepts a \u003ccode\u003ePOST\u003c\/code\u003e payload containing \u003ccode\u003e{ service, path, method, payload }\u003c\/code\u003e to execute against an upstream API.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eValidates safety and allowlists:\u003c\/strong\u003e Checks the requested \u003ccode\u003eservice\u003c\/code\u003e and \u003ccode\u003epath\u003c\/code\u003e against an allowlisted service registry; returns \u003cstrong\u003e404\u003c\/strong\u003e for unknown services or unsafe paths.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eEnforces Redis-backed rate limits:\u003c\/strong\u003e Loads the service limiter state from Redis and computes the effective request limit.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eHandles upstream backoff correctly:\u003c\/strong\u003e If a backoff window is still active, returns a \u003cstrong\u003e429\u003c\/strong\u003e with a \u003ccode\u003eRetry-After\u003c\/code\u003e header.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAtomically counts requests per window:\u003c\/strong\u003e Increments a per-window counter in Redis and either allows the call, delays it until the next window (when it can wait), or returns a \u003cstrong\u003e429\u003c\/strong\u003e when over budget.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eProxies to the upstream API and adapts:\u003c\/strong\u003e Makes the upstream HTTP request, inspects response status and rate-limit headers, then updates limiter state in Redis using \u003cstrong\u003eAIMD rules\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReturns results with throttle metadata:\u003c\/strong\u003e Responds with the upstream result (or upstream 429) and includes rate-limit\/throttle information.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eProtecting SaaS integrations from upstream throttling by centralizing rate-limit enforcement for multiple services.\u003c\/li\u003e\n  \u003cli\u003eBuilding a resilient “API gateway” in n8n that adapts automatically to \u003cem\u003e429\u003c\/em\u003e and \u003cem\u003eRetry-After\u003c\/em\u003e.\u003c\/li\u003e\n  \u003cli\u003eThrottling high-volume automation jobs without manual tuning by updating service registry configuration.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eNodes\/logic:\u003c\/strong\u003e \u003ccode\u003ewebhook\u003c\/code\u003e, \u003ccode\u003eif\u003c\/code\u003e, \u003ccode\u003eset\u003c\/code\u003e, \u003ccode\u003ecode\u003c\/code\u003e, \u003ccode\u003ewait\u003c\/code\u003e, \u003ccode\u003eredis\u003c\/code\u003e\n\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eState storage:\u003c\/strong\u003e Redis credentials configured on all Redis nodes that read\/write limiter state and per-window counters.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eConfiguration step:\u003c\/strong\u003e Update service registry values (base URLs, limits, window seconds, optional headers, and max wait) to match your upstream APIs.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46157927874739,"sku":"N8N-20356","price":8.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/x8VWPwUDwGdh_bqcixW3n_jR5sKBiW.png?v=1791018608","url":"https:\/\/buyflowscripts.com\/products\/n8n-webhook-proxy-for-adaptive-api-rate-limiting-with-redis","provider":"N8N Commerce","version":"1.0","type":"link"}