Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for gateway compression #317

Open
VelvetToroyashi opened this issue Sep 30, 2023 · 0 comments
Open

Support for gateway compression #317

VelvetToroyashi opened this issue Sep 30, 2023 · 0 comments

Comments

@VelvetToroyashi
Copy link
Contributor

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.

@VelvetToroyashi VelvetToroyashi changed the title Gateway compression Support for gateway compression Oct 1, 2023
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

No branches or pull requests

1 participant