-
Notifications
You must be signed in to change notification settings - Fork 28
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
Need to account for rate limiting #1
Comments
I started to work on this, but unfortunately I don't think it's as straightforward as it seems. When we exceed the rate limit, we get a response that looks like this:
Note that there's no retry-after header, so we don't really know how long to wait before trying again. I tried using an exponential backoff, but even after sleeping for a minute we're still locked out. I think the best way to go is actually going to be to insert rows in batches rather than one at a time. The API allows us to insert multiple rows at a time. Note that if we do this, we'll need to ensure that we emit a STATE message only after we save all of the records that came before it. |
Based on this doc, we could try setting an internal rate limit accordingly and see if that behaves any better. Given Google's general API support I doubt we'll get anything nicer than that. |
I opened PR #7 to batch together multiple records to the same stream into a single API call. The batch size is configurable and it solved my issue with rate limit requests. The target could still benefit from some internal rate limiting and/or retry logic though. @timvisher are you the right person to review the PR? |
Someone from Stitch will get to this when they have bandwidth. Unfortunately I can't make any promises regarding the timeline. |
While using the gsheet target, I hit a rate limit error. It seems as though this target needs to account for those limits by throttling accordingly, otherwise it won't be usable for more than a trivial amount of data.
The text was updated successfully, but these errors were encountered: