Skip to content

Commit

Permalink
fix: more memory and time
Browse files Browse the repository at this point in the history
  • Loading branch information
alanshaw committed Sep 16, 2024
1 parent 97c124b commit abc9f1c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions stacks/aggregator-stack.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ export function AggregatorStack({ stack, app }) {
// Guarantee exactly-once processing
// (Note: maximum 10 batch)
fifo: true,
// During the deduplication interval (10 minutes), Amazon SQS treats
// During the deduplication interval (12 minutes), Amazon SQS treats
// messages that are sent with identical body content
contentBasedDeduplication: true,
queueName: `${bufferQueueName}.fifo`,
visibilityTimeout: Duration.minutes(10)
visibilityTimeout: Duration.minutes(12)
}
},
})
Expand Down Expand Up @@ -191,15 +191,15 @@ export function AggregatorStack({ stack, app }) {
aggregatorBufferStoreBucket,
aggregateOfferQueue
],
timeout: '10 minutes',
memorySize: '4 GB'
timeout: '12 minutes',
memorySize: '6 GB'
},
deadLetterQueue: bufferQueueDLQ.cdk.queue,
cdk: {
eventSource: {
// we can reduce most buffers possible at same time to avoid large buffers to create huge congestion on the queue while being processed.
// also makes less lambda calls and decreases overall execution time.
batchSize: 3,
// also makes fewer lambda calls and decreases overall execution time.
batchSize: 2,
// allow reporting partial failures
reportBatchItemFailures: true,
},
Expand Down

0 comments on commit abc9f1c

Please sign in to comment.