CCM-16073 - Performance test changes and concurrency optimisation#173
Open
mjewildnhs wants to merge 19 commits intofeature/CCM-16073from
Open
CCM-16073 - Performance test changes and concurrency optimisation#173mjewildnhs wants to merge 19 commits intofeature/CCM-16073from
mjewildnhs wants to merge 19 commits intofeature/CCM-16073from
Conversation
38166d9 to
817e3c0
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the performance-testing toolchain and related Lambdas/infra to support higher-throughput scenarios, concurrent perf runs, and failure-injection controls for circuit-breaker/rate-limiter tuning.
Changes:
- Perf runner: add
skipPurgeand configurable CloudWatch settling delay; add SQS queue depth sampling; extend scenario/phase event mix and failure injection fields. - Mock webhook: refactor request handling and add time-bounded forced-status responses via messageId encoding.
- Delivery + infra: increase https-client Lambda default concurrency, add structured per-record logging, adjust SQS retry/visibility behavior, and pass circuit-breaker timing through Terraform.
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/performance/fixtures/subscriptions/perf-client-1.json | Adjust perf fixture invocation rate limit. |
| tests/performance/fixtures/subscriptions/perf-client-2.json | Adjust perf fixture invocation rate limit for high-throughput testing. |
| lambdas/perf-runner-lambda/src/types.ts | Extend scenario/event types with forced status fields, per-phase event mix override, and new payload flags. |
| lambdas/perf-runner-lambda/src/sqs-stats.ts | Add helper to sample queue depth via GetQueueAttributes. |
| lambdas/perf-runner-lambda/src/runner.ts | Add logging, queue depth sampling, per-phase eventMix override, skip purge option, and configurable CloudWatch settling wait. |
| lambdas/perf-runner-lambda/src/purge.ts | Update derived DLQ URL naming; simplify purge behavior. |
| lambdas/perf-runner-lambda/src/index.ts | Plumb cloudWatchSettlingMs and skipPurge from event into runner. |
| lambdas/perf-runner-lambda/src/event-factories.ts | Encode forced status settings into generated messageIds. |
| lambdas/perf-runner-lambda/src/tests/sqs-stats.test.ts | Add unit tests for queue depth sampling helper. |
| lambdas/perf-runner-lambda/src/tests/runner.test.ts | Update runner tests for new flags and queue depth sampling. |
| lambdas/perf-runner-lambda/src/tests/purge.test.ts | Update purge URL expectations and purge error behavior tests. |
| lambdas/perf-runner-lambda/src/tests/index.test.ts | Update handler tests for new runner args. |
| lambdas/perf-runner-lambda/src/tests/event-factories.test.ts | Add tests for forced-status messageId encoding and forwarding. |
| lambdas/mock-webhook-lambda/src/index.ts | Refactor handler logic and add timed forced-status behavior. |
| lambdas/mock-webhook-lambda/src/tests/index.test.ts | Add tests for timed forced-status behavior (pre/post expiry). |
| lambdas/https-client-lambda/src/handler.ts | Increase default concurrency; add per-record structured logs; adjust visibility delay logic and mapping of messages to records. |
| lambdas/https-client-lambda/src/tests/handler.test.ts | Update tests to match new deterministic visibility delay behavior. |
| infrastructure/terraform/modules/client-delivery/variables.tf | Increase default batch size and add batching window + CB timing variables. |
| infrastructure/terraform/modules/client-delivery/module_https_client_lambda.tf | Pass CB timing env vars; configure SQS event source batching window. |
| infrastructure/terraform/modules/client-delivery/README.md | Document new/updated module inputs. |
| infrastructure/terraform/components/callbacks/variables.tf | Increase pipe input batch size default; add CB timing variables. |
| infrastructure/terraform/components/callbacks/pre.sh | Fix tfvars quoted-value parsing for deploy flags. |
| infrastructure/terraform/components/callbacks/module_perf_runner_lambda.tf | Fix DLQ ARN reference and add sqs:GetQueueAttributes permissions. |
| infrastructure/terraform/components/callbacks/module_client_delivery.tf | Pass CB timing variables into client-delivery module. |
| infrastructure/terraform/components/callbacks/README.md | Document updated defaults and new CB timing inputs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
HTTPS Client Lambda
correlationId,receiveCount,firstReceivedAt)Perf Runner Lambda
skipPurgeflag — allows multiple concurrent Lambda workers without purge conflictscloudWatchSettlingMspassthrough to override the default 60s CloudWatch settling waitsqs-stats.ts— logs queue depth (ApproximateNumberOfMessages,ApproximateNumberOfMessagesNotVisible) per phaseevent-factories.tswithforcedStatusCodeandforcedStatusCodeUntilMsfields for time-bounded failure injectionrunner.tswith queue stat logging and SQSGetQueueAttributesintegrationMock Webhook Lambda
forcedStatusCodewith time-bounded expiry (forcedStatusCodeUntilMs) — if the timestamp has passed, the webhook returns 200 instead of the forced codeInfrastructure
cb_cooldown_period_ms,cb_recovery_period_ms— passed through from component toclient-deliverymodule tohttps-client-lambdaenvironmentpipe_sqs_input_batch_sizedefault from 1 to 10 for throughputsqs:GetQueueAttributespermission for the perf-runner Lambda on inbound + delivery queues-dlqsuffix →module.sqs_inbound_event.sqs_dlq_arn)pre.shfordeploy_mock_clients/deploy_perf_runnertfvar parsingContext
CCM-16073 — Performance testing and tuning of the rate-limiting and circuit-breaker mechanisms. Adds infrastructure and Lambda changes needed to run targeted perf scenarios (single-client throughput, circuit-breaker trip/recovery) with configurable CB timing, concurrent workers, and failure injection.
Type of changes
Checklist
Sensitive Information Declaration
To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.