Skip to content

Support for gateway compression #317

@VelvetToroyashi

Description

@VelvetToroyashi

Description

Remora.Discord does not currently support gateway compression.

This reduces bytes sent over the wire, and can allow for potentially more data to be processed as a result.

Why This is Needed

Discord bots deal with exponentially more data as they scale, and one of the common bottlenecks is ingress bandwidth. It's important to support compression both for network constraints and to be in parity with the API. Right now, the compress field is hard-coded to false, as the underlying IPayloadTransportService does not have support for any form of (de-)compression.

Alternatives Considered

Currently, I am writing my own payload transport service to handle this, and will PR something similar to Remora when I have time, if this is not picked up by someone else before that happens.

Additional Details

Ideally, we'll also support transport compression (which compresses the entire stream, instead of "select packets") as well; however these two are mutually exclusive, and would require some extra validation on the client to ensure both of these are not set simultaneously.

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