-
Notifications
You must be signed in to change notification settings - Fork 218
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
what happens when kinesis is throttled? #29
Comments
I've looked into this some more. I see this pattern over and over again: each record of the record set is tried even though kinesis reports it's throttled. When record 500 fails the record set is requeued until eventually the kinesis throttling is removed and then the recordset uploads successfully. The code has it's own throttling but I see no sign of it actually being used. Is this expected behaviour?
|
I set flows with this
But to no joy. I don't see any throttler logs or throttling :-( |
Hi, When throttling happens, it happens to per record rather than the whole batch. Let's say there are 500 records in each putRecordBatch call, and 5 records are throttled, you will get RecordSendError of 5 and ServiceErrors of 0. And the 5 throttled records will be queued for retrying in the next batch. If the whole batch of 500 records are throttled, the 500 records will be queued for retrying and the tail won't proceed until the publish queue is not full. The default capacity of the queue is 100 if not configured. It was designed in this way because we don't want to lose data even if service throttling occurs. |
Hi, it's more that I don't see any evidence of actual slow-down. Things are just continuously retried until the Kinesis stream is open again. The back-off doesn't look to happen. |
I seem to have been able to see the throttler and the backoff working with handling send failures. I tried to make the agent send records to a non-existed stream, and it backs off upon ResourceNotFound failures. I'll try to reproduce the case of Kinesis throttling, if it doesn't work, I suspect it could be we are not counting throttling as failures. |
I've been able to make requests with high throughput that causes the Kinesis to return ServiceUnavailableException, and the throttler is working fine: 2016-05-25 22:11:11.129+0000 ip-172-31-10-201 (sender-1) com.amazon.kinesis.streaming.agent.tailing.FirehoseSender [DEBUG] fh:mystream:/tmp/app.log_:RecordBuffer(id=4456,records=500,bytes=36172) Errors from firehose mystream: ServiceUnavailableException: 500 |
Actually if the error is ProvisionedThroughputExceededException, the throttler doesn't seem to be working. I'll have to dive deeper into it. |
Yep that's what I see. |
Actually I'm able to see the throttler working even upon ProvisionedThroughputExceededException [exec] 2016-05-27 12:18:17.044-0700 chaocheq.desktop.amazon.com (sender-20) com.amazon.kinesis.streaming.agent.tailing.KinesisSender [ERROR] kinesis:kin |
Can you share the magic config that printed these debugging messages? I've found it hard to see output like that. Thanks. |
I was just using "log.level" : "DEBUG" for that. I also switched some trace log to error which I'll check in another commit later. |
Hi again,
:-)
What's the behaviour of the agent when say for example Kinesis is throttled? Do logs get dropped or does the tailing stay at the last sent log or something else?
I've noticed memory consumption increase as throttling occurs.
In our testing we configured log generation to be much greater than what a kinesis stream could handle. When throttling turned off (i.e, kinesis allowed traffic again) we saw very high short bursts of CPU utilisation until throttling started again. What could be done to limit this?
The text was updated successfully, but these errors were encountered: