Skip to content

HTTP long-polling support #245

Open
Open
@michel-laterman

Description

@michel-laterman

The opamp-spec does not explicitly support long-polling HTTP requests.

In theory, an opamp-server could hold off on responding to the client's HTTP request for a period of time, assuming the client does not time-out, before sending a response.
This would lead to less connections being formed, and less messages being exchanged by the client+server.

However this breaks existing assumptions with how the client communicates with the server:

opamp-spec/specification.md

Lines 484 to 491 in e18e075

- When the Server wants to send a message to the Agent, the Server needs to wait
for the Client to poll the Server and establish an HTTP request over which the Server's
message can be sent back as an HTTP response.
- When the Agent wants to send a message to the Server and the Agent has previously sent
a request to the Server that is not yet responded, the Client MUST wait until the
response is received before a new request can be made. Note that the new request in
this case can be made immediately after the previous response is received, the Client
does not need to wait for the polling period between requests.

When it comes to long-polling connections, the client would not be able to reliably update the server for the poll duration.

If we want to add long-polling support for HTTP connections we should add a mechanism to allow the client to send another message to the server without receiving a response.

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