-
Notifications
You must be signed in to change notification settings - Fork 181
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
Improve Outputs throughput handling #963
Comments
Hi @aleksmaus, Thanks for this issue and your very clear comments and feedback. I was already aware of most of the issues you mention. I will comment here to explain the "why" to avoid to pollute the PR. The config and client have been developed with a "naive" vision from the beginning. First because I started the project years ago, my Go skills were much lower (are they better now? not so sure...) and because I had in mind to give a very explicit and easy to understand code base which could allow any one, even with a small knowledge of Go, to contribute and add a new output. I still have in mind to create a v3 some day, up to date with the best practices, but as Falcosidekick is very stable, gets very few bug report, my focus is on other projects (I still maintain it, and will continue, the project lives and will) like https://github.com/falco-talon/falco-talon which is way better designed (I hope) and may be used as base for the next Falcosidekick. Anyway, your PR are very welcome and valuable, I'm happy to review them. Thanks again. |
Hi @Issif, |
the project is not started, don't know it will be, so your improvements for the v2.x are welcome 😉 |
I'll close this issue now, since the short and mid term goals are addressed now. The long term is probably a candidate for v3 that you mentioned, so can revisit the details when it comes down to it. |
Thanks a lot for your help 🙏 |
Hi 👋
I was playing with Falco Sidekick with Elasticsearch Output specifically, but I think this issue would be common for all http outputs and possibly others.
Currently there is not limiters on the number of the outgoing requests from the Sidekick:
for each document from Falco the Go routine is created
https://github.com/falcosecurity/falcosidekick/blob/master/handlers.go#L267
that creates an http request and the connection to the server.
In many different Outputs the mutex lock is used for the Auth headers, for example:
https://github.com/falcosecurity/falcosidekick/blob/master/outputs/elasticsearch.go#L60
So we see the different runtime characteristics depending how the Output configured.
For Elasticsearch output:
customHeaders
for API Key auth specified, all the requests are executed at the "same time". Where with the high rate of incoming data you will see unlimited number connections to Elasticsearch, that ends up with the large number of outgoing connections and TLS handshake or IO timeouts errors etc.The issue overall is that depending on the rate of incoming data and configuration of the output it is possible to destabilize the Sidekick and the environment it runs on. Need more predictable, configurable resources and networking utilization.
Possible steps to address.
Short term
Mid term
Long term
Please let me know if you have any thoughts/feedback or if somebody is already addressing these issues. Meanwhile I'll start working on this.
The text was updated successfully, but these errors were encountered: