Commit 76380bc
authored
feat: add proxy-stress-test sample app for e2e regression testing (#217)
* feat: add proxy-stress-test sample app for e2e regression testing
Go app that exercises Keploy proxy under stress conditions:
- 10+ concurrent HTTPS connections through a forward proxy (tinyproxy)
via CONNECT tunnels, triggering TLS MITM cert generation
- PostgreSQL queries returning 50+ rows with 100KB+ payloads, testing
wire protocol handling for large DataRow responses
- HTTP POST through CONNECT tunnel for MatchType validation
Includes Docker Compose with postgres + tinyproxy + the app.
Used by the proxy-stress-test CI pipeline in keploy/keploy.
Signed-off-by: Shubham Jain <shubham@keploy.io>
Signed-off-by: slayerjain <shubhamkjain@outlook.com>
* fix: address all Copilot review comments on sample app
- Fix module path to match repo layout (samples-go/proxy-stress-test)
- Remove dependency on external test-iid.sh in test.sh
- Remove sudo usage in test.sh for portability
- Pin tinyproxy image tag, bind proxy to localhost, restrict Allow
- Replace WARN log with normal log level
- Add actionable hint to database connection fatal
- Handle http.NewRequest error in background noise goroutine
- Redact database credentials in log output
- Check rows.Err() after iteration for mid-stream error detection
- Handle wideRows.Scan error instead of discarding
- Add nolint:gosec comment for intentional InsecureSkipVerify
- Update go.mod after module path change
Signed-off-by: Shubham Jain <shubham@keploy.io>
Signed-off-by: slayerjain <shubhamkjain@outlook.com>
* fix: consistent CLI flags, health timeout, gofmt formatting
- Use --generate-github-actions=false and --container-name consistently
(matching other samples in the repo).
- Add max_attempts=30 timeout to health wait loop to fail fast on
broken builds instead of looping indefinitely.
- Run gofmt on main.go to fix indentation around scan error check.
Signed-off-by: Shubham Jain <shubham@keploy.io>
Signed-off-by: slayerjain <shubhamkjain@outlook.com>
* fix: address Copilot review round 3 — naming, cleanup, timeouts
- Rename binary from repro-app to proxy-stress-test in Dockerfile.
- Update OTel service name to match sample directory name.
- Add cleanup trap (docker compose down) on script exit.
- Add curl --max-time to all requests to prevent CI hangs.
- Add docker compose down after replay phase.
- Add 5s timeout to /health db ping.
- Fix misleading "concurrently" comment (queries are sequential).
Signed-off-by: Shubham Jain <shubham@keploy.io>
Signed-off-by: slayerjain <shubhamkjain@outlook.com>
* fix: cd to script directory before running docker compose
Ensures the script works when invoked from any working directory.
Signed-off-by: Shubham Jain <shubham@keploy.io>
Signed-off-by: slayerjain <shubhamkjain@outlook.com>
* ci: add CPU/memory limits and stress parameters to docker-compose
- Set CONCURRENT_CONNS=42 and BATCH_SIZE=42 matching production
traffic pattern from Agoda travel-card-api.
- Enable OTel with no collector to generate mock-not-found errors
that stress the error channel during replay.
- Add BG_NOISE_CONNS=2 for background connection noise.
- Set deploy.resources.limits: cpus=0.50, memory=512M to simulate
resource-constrained K8s pods where the bugs are observable.
Signed-off-by: Shubham Jain <shubham@keploy.io>
Signed-off-by: slayerjain <shubhamkjain@outlook.com>
---------
Signed-off-by: Shubham Jain <shubham@keploy.io>
Signed-off-by: slayerjain <shubhamkjain@outlook.com>1 parent 7a978e1 commit 76380bc
File tree
7 files changed
+867
-0
lines changed- proxy-stress-test
7 files changed
+867
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
0 commit comments