

- #Aws dynamodb client connection with .net core update#
- #Aws dynamodb client connection with .net core code#
#Aws dynamodb client connection with .net core update#
#Aws dynamodb client connection with .net core code#
Our test app mimics the production load that caused the issue fairly closely, except for the artificial data and arbitrary waiting (our actual code consumes work from SQS as well). We're in final production testing, and were blindsided by this issue when we ran out of ephemeral ports.

We're trying to launch a new service for our platform that utilizes DynamoDb at large scale. We have also tried various settings for the AmazonDynamoDBClient, such as turning on CacheHttpClient, enabling UseHttp, setting MaxConnectionsPerServer to 1000, and enabling ReadEntireResponse. An example command line might be: dotnet DynamoDbTester.dll 0 8 3, which in our testing produces plenty of traffic to observe the issue.

It requires a table set up which the default credentials have write access to, with a partition key of "key" and sufficient quota. Net Core 1.0 which will reproduce the issue when run. We have created a public repo with a test case written in. The backend service also needs to allow connection reuse. Net Core), supports settings such as = false and may require the entire response to be read and then disposed from each request in order to pipeline well. HttpClient (which I believe is employed in. Unknown, something is not allowing the connection to be reused. Latency seems to also suffer, likely partly due to having to establish a connection all the time before the request proper can be made. HTTP connections are not reused and this is causing our application to exhaust the machine's ephemeral port pool, causing widespread issues not limited to loss of DynamoDb access. This would keep connections in the TIME_WAIT state to a minimum and improve latency over the wire. HTTP connections should be allowed to be reused, along with pipelining of requests if possible, unless specifically configured otherwise. After all ephemeral ports are exhausted, other services/operations on the node tend to fail as well, so the "damage" is not limited to DynamoDb clients. Response times also suffer due to TCP/SSL connection setup handshaking for most/all requests. When using the AmazonDynamoDBClient in a high throughput fashion (1000+ requests/second), nodes can exhaust their ephemeral port pool due to the number of closed connections in TIME_WAIT.
