lucashenning / logstash-filter-rest

REST Filter for Logstash
Other
43 stars 51 forks source link

http keep alive #7

Closed gandalfb closed 8 years ago

gandalfb commented 8 years ago

I had the behaviour of the rest_client not using http-keep-alive. Leading to a really inefficient connection usage and poor performance.

On the http_poller plugin I stumbled upon the mixing HTTPClient, which supports this.

So I made some changes on the config section, with - maybe - including some "logstash" style documentation. Validation and request setup mostly is sourced from the http_poller plugin, but omitting the url regex check, to support field references.

Further changes:

First "live" tests in an integration env show quite a performance boost and a really small number of tcp connections (1 or 2 reused connections instead of ~400 waiting connections), which solves my initial issue including a fallback handling. Further parameters are also configurable within the Manticore object (request) => logstash-mixin-http_client

Maybe this is something useful, although the config syntax is changed, implicating a major version?

lucashenning commented 8 years ago

Awesome work @gandalfb! I appreciate your contribution. Guess it's a good approach to align the style to the logstash standards and I like the performance improvement.

You're right, this should be a major version. However, I guess we are still away from a stable version. So, if you don't mind I'll call this one v0.2.0.

lucashenning commented 8 years ago

Just published the new gem v0.2.0: https://rubygems.org/gems/logstash-filter-rest/versions/0.2.0 Thanks again for your help. Hope I'll find time to keep working on this...