Commit f4fb7e4
committed
source-kinesis: don't try to make more than 5 requests per second
Kinesis has a 5 transactions per second limit for a single shard, and a
GetRecords call counts against that.
Previously the backoff & retry logic of the SDK was used exclusively for
managing this, but that's not ideal since the retry behavior is rather
aggressive, and any time you exceed the provisioned throughput the server will
close the connection. This was actually causing a lot of connection churn and
occasional DNS resolution failures.
The fix here is to use a client-side rate limiter that respects the 5 TPS limit.
Experimentally I have observed that this nearly eliminates the connection churn,
and should improve the stability of the connector.1 parent 02a20fe commit f4fb7e4
2 files changed
+8
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
345 | 346 | | |
346 | 347 | | |
347 | 348 | | |
| 349 | + | |
| 350 | + | |
348 | 351 | | |
349 | 352 | | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
350 | 356 | | |
351 | 357 | | |
352 | 358 | | |
| |||
375 | 381 | | |
376 | 382 | | |
377 | 383 | | |
378 | | - | |
379 | | - | |
380 | | - | |
| 384 | + | |
381 | 385 | | |
382 | 386 | | |
383 | 387 | | |
384 | 388 | | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | 389 | | |
392 | 390 | | |
393 | 391 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | | - | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
0 commit comments