-
Notifications
You must be signed in to change notification settings - Fork 83
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
Load limit on fleet server also limits its own Elastic Agent #1859
Comments
Based on recent tests done by @ablnk and following an analysis done by @joshdover. Fleet server elastic agent is logging "429" errors due to Fleet server limiting the number of connection. |
I would be curious to know if the Fleet Agent is using the loopback. |
Unfortunately I do not think that we log it. |
@michel-laterman - @michalpristas is already looking at it. We'll ping you as soon as we progress on this |
looks like failure is not coming from max_connection limiter but rather from checkin Limit limiter. in ct := api.NewCheckinT(f.verCon, &cfg.Inputs[0].Server, f.cache, bc, pm, am, ad, tr, bulker)
router := api.NewRouter(ctx, bulker, ct, et, at, ack, st, sm, tracer, f.bi)
g.Go(loggedRunFunc(ctx, "Http server", func(ctx context.Context) error {
return api.Run(ctx, router, &cfg.Inputs[0].Server)
})) inside handler ( ct := &CheckinT{
verCon: verCon,
...,
limit: limit.NewLimiter(&cfg.Limits.CheckinLimit),
bulker: bulker,
} then this is used in for _, addr := range listeners {
server := http.Server{
Addr: addr,
...
Handler: router, <<<
...,
} we need to find a solution to separate these, some are nicer (separate router/limiter per listener) some are faster (apply limit only for external requests) |
Interesting. Probably not hitting the max-checkin case; but can certainly hit the throttle to prevent check-ins coming to fast. Cleanest way would be to create a separate router for each interface. Agreed. Adding limit per external request is going to be messy and hard to reason about. |
Instead of creating a separate router per listener, which would require creating separate endpoint handers ( |
Apparently, the connection limit is applied to Fleet Server own Elastic Agent.
This mean that under an heavy load, the Fleet Server Elastic Agent can be prevented from checkin in and as a result FS is shown as unhealthy.
This issue will act as a placeholder for any further discoveries regarding Fleet Server config.
The text was updated successfully, but these errors were encountered: