We're experiencing intermittent high latency issues with our Kinesis implementation:
Setup:
- Kinesis stream with 64 shards
- 40 consumers polling continuously
- Using @aws-sdk/client-kinesis v3.74.0
- Latency-sensitive application
- both poller and consumers are in eu-west region
Issue:
We've observed that some GetRecords calls are taking approximately 4 minutes to complete. This is happening intermittently and causing significant latency spikes in our processing.
Questions:
- Why would GetRecords calls take 4 minutes to complete sometimes? Is this a known issue?
- Is there a way to set a requestTimeout in the AWS SDK for Kinesis specifically? The documentation isn't clear about timeout configuration.
- If we implement our own timeout mechanism, would subsequent GetRecords calls be likely to succeed, or would they face the same issue?
- ** What's the recommended approach to handle such scenarios in latency-sensitive applications?**
Any insights into the cause and potential solutions would be greatly appreciated