Missed calls to DynamoDB when using Async client in Spring Webflux (proect Reactor) #5079
Unanswered
spachari-im
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am working on a Spring Boot project running Webflux (version 5.3).
In a REST endpoint that has high traffic (approx 500-1000 rpm) , there are 2 async updates to AWS DynamoDB tables, aggregated together with a Mono.when(). There is a Datadog metric reported before calling Mono.when (metric-1) and a metric reported in the DynamoDB update method for success (metric-2) and failure (metric-3).
Here is the pseudo code:
I am expecting that all calls to DynamoDB should report either success or failure metric. That is, metric-1 = 2 * (metric2+metric3).
However I notice that a consistent number (about 20%) of calls to
Mono.fromFuture(dynamoDbAsyncClient.updateItem(toDynamoRequest)
does not report a success or failure metric. I can also see that the data is not being updated in DynamoDB.I can see the percentage of missed calls reduce to 15% when I reduce the number of requests per host by scaling up the cluster.
Is this possibly due to the default NettyNioAsyncHttpClient unable to process requests above a certain threshold?
How can I change the code to catch requests that are rejected?
Beta Was this translation helpful? Give feedback.
All reactions