-
Notifications
You must be signed in to change notification settings - Fork 351
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
skipper: add server connection keepalive limits #3246
Conversation
bc17d16
to
0576c43
Compare
Clients may connect to a subset of Skipper fleet which leads to uneven request distribution and increased cpu usage. Autoscaling of Skipper fleet is not effective because clients stay connected to old instances while new instances are underutilized. This change adds ConnManager that tracks creation of new connections and closes connections when their age or number of requests served reaches configured limits. Signed-off-by: Alexander Yastrebov <alexander.yastrebov@zalando.de>
0576c43
to
475b6e8
Compare
@@ -243,6 +243,8 @@ type Config struct { | |||
ReadHeaderTimeoutServer time.Duration `yaml:"read-header-timeout-server"` | |||
WriteTimeoutServer time.Duration `yaml:"write-timeout-server"` | |||
IdleTimeoutServer time.Duration `yaml:"idle-timeout-server"` | |||
KeepaliveServer time.Duration `yaml:"keepalive-server"` |
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.
Named similar to existing keepalive-backend
and *-server
flags.
} | ||
|
||
func (cm *ConnManager) connState(_ net.Conn, state http.ConnState) { | ||
cm.count(fmt.Sprintf("lb-conn-%s", state)) |
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.
👍 , I think this is to have the current metrics, right?
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.
Yes, moved it here
👍 |
1 similar comment
👍 |
+ zalando/skipper#3227 + zalando/skipper#3225 + zalando/skipper#3234 + zalando/skipper#3239 + zalando/skipper#3240 + zalando/skipper#3241 + zalando/skipper#3242 + zalando/skipper#3245 + zalando/skipper#3246 + zalando/skipper#3247 + zalando/skipper#3249 + zalando/skipper#3248 FYI zalando/skipper@v0.21.198...v0.21.208 Signed-off-by: Roman Zavodskikh <roman.zavodskikh@zalando.de>
+ zalando/skipper#3227 + zalando/skipper#3225 + zalando/skipper#3234 + zalando/skipper#3239 + zalando/skipper#3240 + zalando/skipper#3241 + zalando/skipper#3242 + zalando/skipper#3245 + zalando/skipper#3246 + zalando/skipper#3247 + zalando/skipper#3249 + zalando/skipper#3248 FYI zalando/skipper@v0.21.198...v0.21.208 Signed-off-by: Roman Zavodskikh <roman.zavodskikh@zalando.de>
+ zalando/skipper#3227 + zalando/skipper#3225 + zalando/skipper#3234 + zalando/skipper#3239 + zalando/skipper#3240 + zalando/skipper#3241 + zalando/skipper#3242 + zalando/skipper#3245 + zalando/skipper#3246 + zalando/skipper#3247 + zalando/skipper#3249 + zalando/skipper#3248 FYI zalando/skipper@v0.21.198...v0.21.208 canary was updated #8214 Signed-off-by: Roman Zavodskikh <roman.zavodskikh@zalando.de>
Add config items for server connection keepalive limits, set no limits by default. See zalando/skipper#3246 Signed-off-by: Alexander Yastrebov <alexander.yastrebov@zalando.de>
Clients may connect to a subset of Skipper fleet which leads to uneven request distribution and increased cpu usage. Autoscaling of Skipper fleet is not effective because clients stay connected to old instances while new instances are underutilized. This change adds ConnManager that tracks creation of new connections and closes connections when their age or number of requests served reaches configured limits. Signed-off-by: Alexander Yastrebov <alexander.yastrebov@zalando.de>
Clients may connect to a subset of Skipper fleet which leads to uneven request distribution and increased cpu usage.
Autoscaling of Skipper fleet is not effective because clients stay connected to old instances while new instances are underutilized.
This change adds ConnManager that tracks creation of new connections and closes connections when their age or number of requests served reaches configured limits.