-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Remove max_number_of_messages cap in Filebeat s3 input #32278
Comments
there's also a PR somewhat relevant to this: #31614 |
As I mentioned in #31614 (comment), I don't believe our input is limited to max_number_of_messages of 10. It will request at most 10 from the API, but you can configure the Have you encountered some kind of error while using You can confirm the number of inflight SQS messages by looking at the |
@andrewkroh the team is trying to address the slower than expected ingestion of SQS logs as reported here: https://github.com/elastic/sdh-beats/issues/2238 Some notable observations:
|
I misinterpreted the cap (I thought that steps from 2. to 4. below were capped at 10 goroutines in total) this is the behaviour I've found in the code:
etc etc we should reach up to the 10th iteration where, in case all of the threads at 5. didn't finish yet but for a few, steps from 2 to 4 will become so yes, @andrewkroh , it's interesting anyway that according to @nimarezainia having multiple integrations increased the throughput if not, it should produce similar increased throughput. if it doesn't I suspect the blocking nature of there still space for optimisation maybe (that was my initial thought): having at max this could also be the case for the different throughput in the two secenarios what do you think @andrewkroh ? |
to summarise:
both are made in batch
every batch is blocking at 1., this means that on a performant enough compute environment the effective throughput for every batch at 2. will be so limited to 10 this seems to be validated by the increased throughput with the 3x integrations configuration @nimarezainia reported beware anyway that such configuration produced instability in the agent that eventually died |
I suspect the difference between using two input instances vs one is that each instance creates its own beat.Client (source ref). There is a lock that is held during the This code could be changed to create one beat.Client per worker to remove any contention for the publish lock. This contention would be most noticeable when there are some local Beats |
Closing because |
In Filebeat aws-s3 input, when SQS notification is set up along with S3 bucket, the
max_number_of_messages
configuration parameter can be used to control the maximum number of SQS messages in flight at any time. Right nowmax_number_of_messages
has a default value of 5 and the maximum accepted value is 10. The maximum value of 10 comes from the limitation of the AWSReceiveMessage
API call.ReceiveMessage
API call retrieves one or more messages, up to 10 from the specified queue.With this limitation, the only way to scale s3 input is to have multiple Filebeat running in parallel pointing to the same SQS queue. @aspacca and I talked about this, it would be good to remove the limitation (10) for the
max_number_of_messages
parameter and that way we can specify a larger value ofmax_number_of_messages
, startmax_number_of_messages
/ 10 go routines for the poller to scale.The text was updated successfully, but these errors were encountered: