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

What is the consequence of setting batchTimeOut to 15 seconds #214

Open
tweng100 opened this issue Jul 30, 2020 · 4 comments
Open

What is the consequence of setting batchTimeOut to 15 seconds #214

tweng100 opened this issue Jul 30, 2020 · 4 comments

Comments

@tweng100
Copy link

Hi,
I read the documentation, the recommended setting for batchTimeout is over 2 minutes. Do you know what is the consequence of setting the timeout to 15 seconds? what are the drawbacks?

Thanks,
Tao

@IanMeyers
Copy link
Contributor

Such a short timeout will likely result in multiple loads at the same time, which can create commit contention and cause other transactions to be delayed.

@taoweng100
Copy link

taoweng100 commented Jul 31, 2020

Thank you very much for your reply. This is really helpful.
If I change the lambda function by putting all redshift copy requests into a queue, and create one receiver that polls the copy requests from the queue one by one and execute them continuously in sequence, could this workaround the 2 minutes limitation? and achieve realtime data delivery? any drawback with this approach?

@IanMeyers
Copy link
Contributor

In theory you could do that. Alternatively, simply write a task that loads all of the copy commands that you’ve run from the Batch history table, and then set the time out to that value +1/ second. In that way you will balance the load time vs commit contention.

@taoweng100
Copy link

thank you very much for the reply. I spent the last couple days learning s3 redshift loader code and still have trouble understand the alternative approach. If possible, could you please elaborate with more details. :-)

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

3 participants