Skip to content
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

no putRecords for batch writting #15

Open
shiroh opened this issue Jun 10, 2015 · 2 comments
Open

no putRecords for batch writting #15

shiroh opened this issue Jun 10, 2015 · 2 comments

Comments

@shiroh
Copy link

shiroh commented Jun 10, 2015

Hi,
I found it is only putRecord but no putRecords for batch operation. I have just do the load test today, when the write reach 200/sec, response will be 400 and show exceed rate limitation which may tell the requests send to fast according to amazon's document.
Did I miss something in the code?

@mhart
Copy link
Owner

mhart commented Jun 10, 2015

No you haven't missed anything in the code – there is no batch writing. This may be an option to add, but there would need to be some configuration around it – how many messages to batch, how often to send the batch, etc – as it could result in unflushed/lost messages.

It wouldn't necessarily stop you getting 400 messages though – the rate limitation from Amazon is applied on a per shard basis so it doesn't matter if you're batching or not – basically if you want to increase throughput then you need to create more shards.

Batching would reduce the number of client requests made – so if that's your bottleneck, then it would help there, but it sounds to me like you're getting throttled by the server.

@shiroh
Copy link
Author

shiroh commented Jun 11, 2015

ProvisionedThroughputExceededException
The request rate is too high, or the requested data is too large for the available throughput. Reduce the frequency or size of your requests. For more information, see Error Retries and Exponential Backoff in AWS in the AWS General Reference.

above is the explanation of 400 in amazon's doc
I guess the _request rate_ here is the http request but not how many writes.
I have tested against a 10 shards stream, but only managed to send around 200 request / sec before I got 400.

So I am wondering whether a _putRecords_ could be a workaround. I will try to add the function into the lib to see if it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants