Skip to content

bitreq: Support multiple connections per origin #658

Description

@tnull

Client currently caches one AsyncConnection per ConnectionKey, so capacity limits cached origins rather than connections to one origin.

Consequently, concurrent requests to the same HTTP/1.1 server share one socket. Pipelining does not provide server-side concurrency with common servers such as Go's net/http, resulting in head-of-line blocking. This is causing serialized remote-storage reads in: lightningdevkit/orange-sdk#90

We should add support for a configurable max_connections_per_origin, with connections selected by availability/load. The existing cache capacity could remain a separate limit on cached origins.

This limitation and possible support for two or three connections was previously noted here: lightningdevkit/vss-client#56 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions