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

return value size limit #3

Open
yinanUCSD opened this issue Jun 7, 2017 · 1 comment
Open

return value size limit #3

yinanUCSD opened this issue Jun 7, 2017 · 1 comment

Comments

@yinanUCSD
Copy link

For specpaxos protocol, is there a limit to the size of return string? We want to have a relatively long string, like thousands of bytes.

@drkp
Copy link
Contributor

drkp commented Jun 7, 2017

Not explicitly, but the underlying UDP messaging library does a pretty terrible job of handling packets that exceed its maximum packet size -- it has rudimentary support for fragmentation, but it doesn't work well at all. So you don't want the return value to exceed the maximum message size minus a few bytes for the rest of the reply message.

That's defined by MAX_UDP_MESSAGE_SIZE in lib/udptransport.c, and set to 9000 by default. In theory this could be set as high as 65507 bytes, but it probably shouldn't exceed the MTU of your network unless you are willing to deal with fragmentation (which could cause problems with multicast delivery).

I don't think it would be too hard to remove this limitation, especially for the reply message, where there's no underlying reason it would need to fit in one message, but we've never done that.

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