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

Add compression support for clients #40

Closed
wants to merge 2 commits into from

Conversation

dougwettlaufer
Copy link
Contributor

Resolves #12

@dougwettlaufer dougwettlaufer self-assigned this Sep 30, 2021
@dougwettlaufer
Copy link
Contributor Author

This is a little more entailed than I realized. Missed the fact that the changes here will solve the compression between client and proxy but we can't just pass compressed frames to the server without the proper negotiation first.

@@ -85,7 +85,7 @@ func ConnectClient(ctx context.Context, endpoint Endpoint, config ClientConnConf

func (c *ClientConn) Handshake(ctx context.Context, version primitive.ProtocolVersion, auth Authenticator) (primitive.ProtocolVersion, error) {
for {
response, err := c.SendAndReceive(ctx, frame.NewFrame(version, -1, message.NewStartup()))
response, err := c.SendAndReceive(ctx, frame.NewFrame(version, -1, message.NewStartup(message.StartupOptionCompression, "LZ4")))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This tagged along with another change. Will need to figure out something else since we can't blindly set compression for every client between proxy and server.

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

Successfully merging this pull request may close these issues.

Add support for compression
1 participant