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

MaxMsgSize prevents large responses over TCP #635

Closed
achille-roussel opened this issue Jan 31, 2018 · 2 comments
Closed

MaxMsgSize prevents large responses over TCP #635

achille-roussel opened this issue Jan 31, 2018 · 2 comments

Comments

@achille-roussel
Copy link

achille-roussel commented Jan 31, 2018

This package limits the size of responses over TCP to MaxMsgSize (64KB), which is causing issues when large result sets are involved.

A specific manifestation of this problem occurs in a system using Consul for service discovery through the DNS interface when a large number of service instances are registered. A more detailed bug report is filed here: hashicorp/consul#3850

After looking through various DNS RFCs, I couldn't find a reference to a required limit to the size of a response over TCP (I could have missed it tho), clients should be able to consume the entire TCP stream in response to their query.

Because this constant is hard coded there is no opportunity for users of this package to work around it.

Would you be open to making the limit configurable so users of the package can choose what upper limit they can tolerate for their setup?

@andrewtj
Copy link
Collaborator

TCP messages are denoted by a two byte length prefix. From RFC 1035: "The message is prefixed with a two byte length field which gives the message length, excluding the two byte length field."

@achille-roussel
Copy link
Author

Oh! OK now I understand where this limit is coming from.

Thanks for the quick answer!

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

2 participants