1 Answer
- Newest
- Most votes
- Most comments
1
Hi,
Ideally if you application is latency sensitive then you should not allow it to wait for that length of time. Given that most of your requests are sub 10ms, it doesn't make sense for your client wait for almost 3000ms.
Firstly you should enable SDK Metrics or AWS X-Ray to understand if the increase in latency is caused by DynamoDB. If so, this is where tuning the client comes into play, you should fail-fast and retry: This Blog is very useful to grasp the concept of client tuning. Your configuration will ultimately depend on your application needs, but reducing the time you wait on a response will greatly reduce the outlier issue you are experiencing.
Relevant content
- asked 6 years ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a month ago
So I finally managed to fix this by extending AWSCredentialsProvider class and creating a custom credentials provider. I simply keep credentials cached and refresh them every 5 minutes.
@GhostFoxGod Could you please share your code snippet/repo for maintaining the credentials with required dependency.