Skip to content

Improve resilience of data fetching with HTTP retry and WebSocket reconnection#188

Open
notshriyansh wants to merge 1 commit intoNetflix:masterfrom
notshriyansh:feat/http-retry-resilience
Open

Improve resilience of data fetching with HTTP retry and WebSocket reconnection#188
notshriyansh wants to merge 1 commit intoNetflix:masterfrom
notshriyansh:feat/http-retry-resilience

Conversation

@notshriyansh
Copy link
Copy Markdown

This PR makes the Metaflow UI's data-fetching layer more resilient when HTTP requests or WebSocket connections fail.

Changes-

HTTP Resilience -
Added retry mechanism with exponential backoff (up to 3 attempts) in useResource

Preserved pagination flow and existing request behavior

Improved handling of transient backend/network failures

WebSocket Improvements -
Enabled reconnection attempts for WebSocket connections

Added better error logging for connection failures

Motivation -
While testing locally, I noticed the UI can become unresponsive when backend services are unavailable or misconfigured. Right now, failed requests just error out with no recovery attempt.

These changes should make things more robust—especially important for future standalone mode, where backend availability might be less reliable.

Scope -
Currently, failed HTTP requests or WebSocket connection issues leave the UI in a degraded state with no retry or recovery mechanism for transient failures. This PR adds retry and reconnection handling to improve resilience in those cases.

- Adds exponential backoff retry (max 3 attempts)
- Improves resilience when backend is unavailable
- Lays groundwork for standalone mode support
@notshriyansh notshriyansh changed the title feat(useResource): add retry mechanism for HTTP fetch failures Improve resilience of data fetching with HTTP retry and WebSocket reconnection Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant