-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
v3rpc: use MaxRecvMsgSize and MaxSendMsgSize to limit msg size #8437
Conversation
etcdserver/api/v3rpc/grpc.go
Outdated
@@ -31,6 +31,7 @@ import ( | |||
const ( | |||
grpcOverheadBytes = 512 * 1024 | |||
maxStreams = math.MaxUint32 | |||
maxSendBytes = math.MaxUint32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for sent size, maybe we also want to make it configurable eventually. then users can limit the size of outbound response. one client wont eat up all bandwidth through a single huge list/watch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I do that for this pr or wait until user asks for it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/cc @heyitsanthony opinion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unlimited until someone asks; abusive clients can chew through bandwidth even with a send limit
…Size grpc 1.3 uses MaxMsgSize() to limit received message size. However, grpc 1.4 introduces a 4mb default limit on send message size. In etcd, server shouldn't be limit size of message that it can be sent. Hence, set maximum size of send message using MaxSendMsgSize().
d16b065
to
d2ca782
Compare
Is anything hitting this limit? |
k8s is failing on large clusters. I assume anyone does unlimited initial cache catch-up will fail similarly. |
via https://jenkins-etcd-public.prod.coreos.systems/job/etcd-coverage/2094/consoleFull
I don't think it is related to this pr. edit: lots failure from coverage run. |
@fanminshi seems unrelated. lgtm. |
grpc 1.3 uses MaxMsgSize() to limit received message size. However, grpc 1.4 introduces a 4mb default limit on send message size. In etcd, server shouldn't be limiting size of message that it can be sent. Hence, set maximum size of send message using MaxSendMsgSize().