Home / Companies / Portkey / Blog / Post Details
Content Deep Dive

Retries, fallbacks, and circuit breakers in LLM apps: what to use when

Blog post from Portkey

Post Details
Company
Date Published
Author
Drishti Shah
Word Count
985
Company Posts That Month
12
Language
English
Hacker News Points
-
Post removed?
No
Summary

In AI applications managing numerous requests through large language models (LLMs) or agents, failures such as timeouts and latency spikes are common, often due to the reliance on external APIs. Initially, reactive strategies like retries and fallbacks are implemented to manage these failures, but they are limited to short-term issues and can inadvertently exacerbate problems when failures are persistent. Circuit breakers offer a proactive solution by monitoring failure patterns and stopping traffic to failing components, thereby preventing system overloads and maintaining performance. These strategies are not interchangeable but rather serve different roles; retries recover from minor glitches, fallbacks provide alternative pathways, and circuit breakers halt further degradation. Portkey’s AI Gateway facilitates the implementation of these strategies by allowing users to configure retry policies, fallback chains, and circuit breakers without extensive custom coding, ensuring system resilience across various providers and models.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.