SShortSingh.
Back to feed

Circuit Breakers and Jittered Backoff Harden Dify Workflows Against API Outages

0
·2 views

A team evaluating Dify for a RAG pipeline found that a brief 503 error from one model provider triggered unbounded retries across 47 concurrent workflows, worsening the outage. The default setup lacked per-provider circuit breakers, used linear retries without backoff, and shared connection pools across workflows. The author proposes a Redis-backed circuit breaker in Python that shares state across workers and isolates failures per provider, plus randomized exponential backoff to avoid synchronized retry storms. After deploying these patterns, the team reported P99 latency falling from 8.3 seconds to 2.1 seconds during provider brownouts.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

CaseFile: A Graph-Based AI Agent Investigates Fraud by Tracing Relationships

An alert flagged an $8,150.50 transfer between two new accounts, and each account looked ordinary when viewed alone. The suspicious pattern only appeared when the connections between accounts were examined, including five new accounts sharing the same devices. CaseFile, a hackathon project built with FalkorDB, uses an LLM that queries a graph database through nine Cypher-based tools rather than relying on prompt-stored customer data. The agent also correctly cleared an innocent customer who shared a device with the ring, based on her ten months of normal history. Each verdict is backed by a reproducible trail of tool calls, and the project's code is publicly available on GitHub.

0
ProgrammingDEV Community ·

MemoTune: browser tool turns lyrics or ideas into AI-generated songs

MemoTune is a browser-based AI song generator that creates full tracks from a typed idea or pasted lyrics of up to 800 characters per prompt. Users can select vocals or instrumental, and specify genre, mood, energy level and song sections. The platform returns two complete versions for users to compare, across styles such as pop, rap, rock, jazz, lo-fi and classical. Users can refine tracks by replacing sections, extending songs, or separating vocals from instrumentals, then share a link or download MP3 audio (WAV on higher plans). The service is freemium, offering free starting credits with paid monthly plans for additional usage.

0
ProgrammingDEV Community ·

Sprite Flow: AI tool generates 2D game sprite animations and exports to major engines

Sprite Flow is an AI-powered sprite generator aimed at 2D game developers. Users can upload or describe a character, pick an art style such as pixel art, cartoon, or anime, and select animations like idle, walk, run, jump, or attack. Outputs can be exported as APNG, GIF, individual frame ZIPs, or transparent sprite sheets with JSON atlases formatted for Unity, Godot, Unreal Paper2D, and Phaser. The platform also supports 8-direction sprites, NPC batches, props, and tilesets, and uses a credit-based pricing model with free daily check-in credits. The article was written by the tool's founder, who is disclosed in the piece.

0
ProgrammingDEV Community ·

MenuGlot: Offline AI Tool Turns Restaurant Menu Photos into English-Marathi Menus

A developer has released MenuGlot, an open-source tool that converts a photo of a restaurant menu into a print-ready version with English and Marathi dish names, half and full prices, short descriptions and a QR code. The problem it targets is that many small local hotels publish menus in only one language, which leaves new customers and tourists unable to read them. The software runs entirely on a laptop using the Qwen2.5-VL 3B model through Ollama, so it has no API costs and keeps menu data on the local machine. In a test on a nine-dish vegetarian rice section from a real hotel, the model produced the required outputs offline. The developer has not yet shown the result to the hotel owner and has no paying users so far.