Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Support retries for hard node.js network failures #3

@thecodedrift

Description

@thecodedrift

Making fetch requests from within node has historically had "glitches" such as the underlying Socket failing with ECONNRESET. Because mongo-data-api talks to a realm app over HTTPS, it's particularly prone to this problem.

  1. Select a low-overhead retry library (possible list https://npmtrends.com/p-retry-vs-promise-retry-vs-retry)
  2. Wrap the fetch calls in retry to minimize connection errors
    1. Is this configuration done at the top level (new MongoClient) or at the individual method level (.findOne(filter, options))
    2. Should backoff be configurable, or should we focus on defaults that make sense for a Realm App
  3. Create suitable mocks to simulate the socket failing

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions