Event-driven Async

Event-driven Architecture

Real-time updates via WebSockets with disconnected backend processes. Separation of concerns provides ultimate scalability.

Event-driven async flow

Step-by-step interactive data flow visualization

1
User prompt
Frontend interaction
2
Your backend
API call to MR
3
ModelRiver
Orchestration
4
AI providers
Auto-failover flow
Async workflow triggered
6
Your webhook
Callback to your server
5
ModelRiver
Message orchestration
7
User's browser
Real-time WS update
Architecture

Why event-driven async?

Separate ingestion from inference. ModelRiver's resilient infrastructure handles the operational complexity of AI requests, ensuring your application seamlessly scales.

Fast Acknowledgment

Immediate response with a secure channel ID. No open connection holding, fundamentally eliminating gateway timeouts on slow generations.

Background Execution

AI runs asynchronously in isolated worker pools. Your backend remains lightning fast and completely insulated from thread exhaustion.

Automatic Fallback

Seamless multi-provider failover baked deeply into the pipeline. Achieve five-nines orchestration without altering any of your client architecture.

Instant Delivery

Real-time WebSocket conduits autonomously push the final streaming payloads directly back to the active client layer.