Skip to content

Commit 1991300

Browse files
committed
remove cloudwatch sdk retries
1 parent 173916e commit 1991300

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/pwa-kit-runtime/src/utils/ssr-server/metrics-sender.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ export class MetricsSender {
5050
apiVersion: '2010-08-01',
5151
// The AWS_REGION variable is defined by the Lambda
5252
// environment.
53-
region: process.env.AWS_REGION || 'us-east-1'
53+
region: process.env.AWS_REGION || 'us-east-1',
54+
// Setting maxRetries to 0 will prevent the SDK from retrying.
55+
// This is necessary because under high load, there will be backpressure
56+
// on the Lambda function, and causing severe performance issues (400-500ms latency)
57+
maxRetries: 0
5458
})
5559
}
5660
return this._CW

0 commit comments

Comments
 (0)