From 48b4d473e1c4068446520e83dc1150c9745b5d8c Mon Sep 17 00:00:00 2001 From: Dmitrii Korolev Date: Tue, 20 May 2025 19:18:26 +0200 Subject: [PATCH 01/11] send invalid header req --- scenarios/rejection.benchmarks.yml | 12 ++++-------- src/BenchmarksApps/TLS/scripts/invalid-header.lua | 7 +++++++ 2 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 src/BenchmarksApps/TLS/scripts/invalid-header.lua diff --git a/scenarios/rejection.benchmarks.yml b/scenarios/rejection.benchmarks.yml index 7aee3abd8..ce474cdbd 100644 --- a/scenarios/rejection.benchmarks.yml +++ b/scenarios/rejection.benchmarks.yml @@ -69,13 +69,11 @@ scenarios: application: job: httpSysServer load: - job: httpclient + job: wrk variables: - path: /hello-world connections: 32 serverScheme: https - customHeaders: - - "X-Custom: Québec" + script: https://raw.githubusercontent.com/aspnet/Benchmarks/main/src/BenchmarksApps/TLS/scripts/invalid-header.lua httpsys-hostheader-mismatch: application: @@ -108,13 +106,11 @@ scenarios: application: job: kestrelServer load: - job: httpclient + job: wrk variables: - path: /hello-world connections: 32 serverScheme: https - customHeaders: - - "X-Custom: Québec" + script: https://raw.githubusercontent.com/aspnet/Benchmarks/main/src/BenchmarksApps/TLS/scripts/invalid-header.lua kestrel-hostheader-mismatch: application: diff --git a/src/BenchmarksApps/TLS/scripts/invalid-header.lua b/src/BenchmarksApps/TLS/scripts/invalid-header.lua new file mode 100644 index 000000000..066190f33 --- /dev/null +++ b/src/BenchmarksApps/TLS/scripts/invalid-header.lua @@ -0,0 +1,7 @@ +-- sends an invalid HTTP header (with space in the name) +request = function() -- before each request https://github.com/wg/wrk/blob/a211dd5a7050b1f9e8a9870b95513060e72ac4a0/SCRIPTING#L42 + return "GET /hello-world HTTP/1.1\r\n" .. + "Host: " .. args[1] .. "\r\n" .. + "Invalid Header: value\r\n" .. + "\r\n" +end \ No newline at end of file From 640ef8cb7c9c86a32965ce6aeaee6215244cf67e Mon Sep 17 00:00:00 2001 From: Dmitrii Korolev Date: Tue, 20 May 2025 19:19:45 +0200 Subject: [PATCH 02/11] fix --- scenarios/rejection.benchmarks.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scenarios/rejection.benchmarks.yml b/scenarios/rejection.benchmarks.yml index ce474cdbd..3ca45b936 100644 --- a/scenarios/rejection.benchmarks.yml +++ b/scenarios/rejection.benchmarks.yml @@ -73,7 +73,7 @@ scenarios: variables: connections: 32 serverScheme: https - script: https://raw.githubusercontent.com/aspnet/Benchmarks/main/src/BenchmarksApps/TLS/scripts/invalid-header.lua + script: https://raw.githubusercontent.com/aspnet/Benchmarks/main/src/BenchmarksApps/TLS/scripts/invalid-header.lua?raw=true httpsys-hostheader-mismatch: application: @@ -110,7 +110,7 @@ scenarios: variables: connections: 32 serverScheme: https - script: https://raw.githubusercontent.com/aspnet/Benchmarks/main/src/BenchmarksApps/TLS/scripts/invalid-header.lua + script: https://raw.githubusercontent.com/aspnet/Benchmarks/main/src/BenchmarksApps/TLS/scripts/invalid-header.lua?raw=true kestrel-hostheader-mismatch: application: From ef210784db50d75325035a2dbbee793595b0aca3 Mon Sep 17 00:00:00 2001 From: Dmitrii Korolev Date: Tue, 20 May 2025 19:25:00 +0200 Subject: [PATCH 03/11] try with proper lua --- scenarios/rejection.benchmarks.yml | 1 + src/BenchmarksApps/TLS/scripts/invalid-header.lua | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/scenarios/rejection.benchmarks.yml b/scenarios/rejection.benchmarks.yml index 3ca45b936..4142b7ba8 100644 --- a/scenarios/rejection.benchmarks.yml +++ b/scenarios/rejection.benchmarks.yml @@ -110,6 +110,7 @@ scenarios: variables: connections: 32 serverScheme: https + scriptArguments: "{{serverAddress}}:{{serverPort}}" script: https://raw.githubusercontent.com/aspnet/Benchmarks/main/src/BenchmarksApps/TLS/scripts/invalid-header.lua?raw=true kestrel-hostheader-mismatch: diff --git a/src/BenchmarksApps/TLS/scripts/invalid-header.lua b/src/BenchmarksApps/TLS/scripts/invalid-header.lua index 066190f33..7fe0f847d 100644 --- a/src/BenchmarksApps/TLS/scripts/invalid-header.lua +++ b/src/BenchmarksApps/TLS/scripts/invalid-header.lua @@ -1,7 +1,17 @@ -- sends an invalid HTTP header (with space in the name) -request = function() -- before each request https://github.com/wg/wrk/blob/a211dd5a7050b1f9e8a9870b95513060e72ac4a0/SCRIPTING#L42 + +local host = "localhost" + +init = function(args) + if #args > 0 then + host = args[1] + end +end + +-- before each request https://github.com/wg/wrk/blob/a211dd5a7050b1f9e8a9870b95513060e72ac4a0/SCRIPTING#L42 +request = function() return "GET /hello-world HTTP/1.1\r\n" .. - "Host: " .. args[1] .. "\r\n" .. + "Host: " .. host .. "\r\n" .. "Invalid Header: value\r\n" .. "\r\n" end \ No newline at end of file From 9d3c6e03590ccc1a51fd8b0177d74949320e9bd1 Mon Sep 17 00:00:00 2001 From: Dmitrii Korolev Date: Tue, 20 May 2025 19:27:28 +0200 Subject: [PATCH 04/11] args? --- src/BenchmarksApps/TLS/scripts/invalid-header.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/src/BenchmarksApps/TLS/scripts/invalid-header.lua b/src/BenchmarksApps/TLS/scripts/invalid-header.lua index 7fe0f847d..e7d525bb2 100644 --- a/src/BenchmarksApps/TLS/scripts/invalid-header.lua +++ b/src/BenchmarksApps/TLS/scripts/invalid-header.lua @@ -3,6 +3,7 @@ local host = "localhost" init = function(args) + print("wrk ARGS:", #arguments, arguments[1]) if #args > 0 then host = args[1] end From d0932b7abd6c4348ec1579ac3fb9c61ac0cc7bad Mon Sep 17 00:00:00 2001 From: Dmitrii Korolev Date: Tue, 20 May 2025 19:30:50 +0200 Subject: [PATCH 05/11] try? --- .../TLS/scripts/invalid-header.lua | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/BenchmarksApps/TLS/scripts/invalid-header.lua b/src/BenchmarksApps/TLS/scripts/invalid-header.lua index e7d525bb2..f6ba81ec2 100644 --- a/src/BenchmarksApps/TLS/scripts/invalid-header.lua +++ b/src/BenchmarksApps/TLS/scripts/invalid-header.lua @@ -1,18 +1 @@ --- sends an invalid HTTP header (with space in the name) - -local host = "localhost" - -init = function(args) - print("wrk ARGS:", #arguments, arguments[1]) - if #args > 0 then - host = args[1] - end -end - --- before each request https://github.com/wg/wrk/blob/a211dd5a7050b1f9e8a9870b95513060e72ac4a0/SCRIPTING#L42 -request = function() - return "GET /hello-world HTTP/1.1\r\n" .. - "Host: " .. host .. "\r\n" .. - "Invalid Header: value\r\n" .. - "\r\n" -end \ No newline at end of file +wrk.headers["Invalid Header"] = "value" \ No newline at end of file From fe8c2a3e027be96c8c0b27ff9e993e6a8d97db94 Mon Sep 17 00:00:00 2001 From: Dmitrii Korolev Date: Tue, 20 May 2025 19:32:18 +0200 Subject: [PATCH 06/11] no script args --- scenarios/rejection.benchmarks.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/scenarios/rejection.benchmarks.yml b/scenarios/rejection.benchmarks.yml index 4142b7ba8..3ca45b936 100644 --- a/scenarios/rejection.benchmarks.yml +++ b/scenarios/rejection.benchmarks.yml @@ -110,7 +110,6 @@ scenarios: variables: connections: 32 serverScheme: https - scriptArguments: "{{serverAddress}}:{{serverPort}}" script: https://raw.githubusercontent.com/aspnet/Benchmarks/main/src/BenchmarksApps/TLS/scripts/invalid-header.lua?raw=true kestrel-hostheader-mismatch: From 3d4cae8503b95c1b2e9aa91faa8ecd89010637a7 Mon Sep 17 00:00:00 2001 From: Dmitrii Korolev Date: Tue, 20 May 2025 19:34:38 +0200 Subject: [PATCH 07/11] explicitly send --- src/BenchmarksApps/TLS/scripts/invalid-header.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/BenchmarksApps/TLS/scripts/invalid-header.lua b/src/BenchmarksApps/TLS/scripts/invalid-header.lua index f6ba81ec2..efb01b885 100644 --- a/src/BenchmarksApps/TLS/scripts/invalid-header.lua +++ b/src/BenchmarksApps/TLS/scripts/invalid-header.lua @@ -1 +1,5 @@ -wrk.headers["Invalid Header"] = "value" \ No newline at end of file +request = function() + return "GET /hello-world HTTP/1.1\r\n" .. + "Invalid Header: value\r\n" .. + "\r\n" +end \ No newline at end of file From 7a2ef9c2b7f1cf8d22655db0efc0da3a0df50440 Mon Sep 17 00:00:00 2001 From: Dmitrii Korolev Date: Tue, 20 May 2025 19:52:07 +0200 Subject: [PATCH 08/11] use different load --- scenarios/aspnet.profiles.yml | 2 +- scenarios/rejection.benchmarks.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scenarios/aspnet.profiles.yml b/scenarios/aspnet.profiles.yml index 3164b6dec..b95d325c8 100644 --- a/scenarios/aspnet.profiles.yml +++ b/scenarios/aspnet.profiles.yml @@ -442,7 +442,7 @@ profiles: - main load: endpoints: - - http://asp-perf-db:5001 + - http://asp-perf-load:5001 aliases: - warmup - secondary diff --git a/scenarios/rejection.benchmarks.yml b/scenarios/rejection.benchmarks.yml index 3ca45b936..df7efe2fb 100644 --- a/scenarios/rejection.benchmarks.yml +++ b/scenarios/rejection.benchmarks.yml @@ -6,7 +6,8 @@ imports: - https://raw.githubusercontent.com/dotnet/crank/main/src/Microsoft.Crank.Jobs.Bombardier/bombardier.yml - https://raw.githubusercontent.com/dotnet/crank/main/src/Microsoft.Crank.Jobs.HttpClient/httpclient.yml - https://raw.githubusercontent.com/dotnet/crank/main/src/Microsoft.Crank.Jobs.Wrk/wrk.yml - - https://github.com/aspnet/Benchmarks/blob/main/scenarios/aspnet.profiles.yml?raw=true + # - https://github.com/aspnet/Benchmarks/blob/main/scenarios/aspnet.profiles.yml?raw=true + - https://github.com/deaglegross/Benchmarks/blob/dmkorolev/rejection-header/scenarios/aspnet.profiles.yml?raw=true variables: serverPort: 5000 From 89df853459a391b8e5507153fa2b8646bfc75057 Mon Sep 17 00:00:00 2001 From: Dmitrii Korolev Date: Tue, 20 May 2025 20:03:06 +0200 Subject: [PATCH 09/11] rollback --- scenarios/aspnet.profiles.yml | 2 +- scenarios/rejection.benchmarks.yml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/scenarios/aspnet.profiles.yml b/scenarios/aspnet.profiles.yml index b95d325c8..3164b6dec 100644 --- a/scenarios/aspnet.profiles.yml +++ b/scenarios/aspnet.profiles.yml @@ -442,7 +442,7 @@ profiles: - main load: endpoints: - - http://asp-perf-load:5001 + - http://asp-perf-db:5001 aliases: - warmup - secondary diff --git a/scenarios/rejection.benchmarks.yml b/scenarios/rejection.benchmarks.yml index df7efe2fb..3ca45b936 100644 --- a/scenarios/rejection.benchmarks.yml +++ b/scenarios/rejection.benchmarks.yml @@ -6,8 +6,7 @@ imports: - https://raw.githubusercontent.com/dotnet/crank/main/src/Microsoft.Crank.Jobs.Bombardier/bombardier.yml - https://raw.githubusercontent.com/dotnet/crank/main/src/Microsoft.Crank.Jobs.HttpClient/httpclient.yml - https://raw.githubusercontent.com/dotnet/crank/main/src/Microsoft.Crank.Jobs.Wrk/wrk.yml - # - https://github.com/aspnet/Benchmarks/blob/main/scenarios/aspnet.profiles.yml?raw=true - - https://github.com/deaglegross/Benchmarks/blob/dmkorolev/rejection-header/scenarios/aspnet.profiles.yml?raw=true + - https://github.com/aspnet/Benchmarks/blob/main/scenarios/aspnet.profiles.yml?raw=true variables: serverPort: 5000 From ce991509d2d50a26b9f4cc2402f50bc1160e91cb Mon Sep 17 00:00:00 2001 From: Dmitrii Korolev Date: Wed, 21 May 2025 18:35:31 +0200 Subject: [PATCH 10/11] try pipelining client --- scenarios/rejection.benchmarks.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/scenarios/rejection.benchmarks.yml b/scenarios/rejection.benchmarks.yml index 3ca45b936..e2abc5ec4 100644 --- a/scenarios/rejection.benchmarks.yml +++ b/scenarios/rejection.benchmarks.yml @@ -5,6 +5,7 @@ imports: - https://raw.githubusercontent.com/dotnet/crank/main/src/Microsoft.Crank.Jobs.Bombardier/bombardier.yml - https://raw.githubusercontent.com/dotnet/crank/main/src/Microsoft.Crank.Jobs.HttpClient/httpclient.yml + - https://raw.githubusercontent.com/dotnet/crank/main/src/Microsoft.Crank.Jobs.PipeliningClient/pipelining.yml - https://raw.githubusercontent.com/dotnet/crank/main/src/Microsoft.Crank.Jobs.Wrk/wrk.yml - https://github.com/aspnet/Benchmarks/blob/main/scenarios/aspnet.profiles.yml?raw=true @@ -69,11 +70,13 @@ scenarios: application: job: httpSysServer load: - job: wrk + job: pipelining variables: + path: /hello-world connections: 32 serverScheme: https - script: https://raw.githubusercontent.com/aspnet/Benchmarks/main/src/BenchmarksApps/TLS/scripts/invalid-header.lua?raw=true + customHeaders: + - "Invalid Header: value" httpsys-hostheader-mismatch: application: @@ -106,11 +109,14 @@ scenarios: application: job: kestrelServer load: - job: wrk + job: pipelining variables: + path: /hello-world connections: 32 serverScheme: https - script: https://raw.githubusercontent.com/aspnet/Benchmarks/main/src/BenchmarksApps/TLS/scripts/invalid-header.lua?raw=true + customHeaders: + - "Invalid Header: value" + kestrel-hostheader-mismatch: application: From ecb7b61f5a6a4e8466717bc8b82a3feff25695cb Mon Sep 17 00:00:00 2001 From: Dmitrii Korolev Date: Fri, 23 May 2025 20:08:36 +0200 Subject: [PATCH 11/11] remove script --- src/BenchmarksApps/TLS/scripts/invalid-header.lua | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 src/BenchmarksApps/TLS/scripts/invalid-header.lua diff --git a/src/BenchmarksApps/TLS/scripts/invalid-header.lua b/src/BenchmarksApps/TLS/scripts/invalid-header.lua deleted file mode 100644 index efb01b885..000000000 --- a/src/BenchmarksApps/TLS/scripts/invalid-header.lua +++ /dev/null @@ -1,5 +0,0 @@ -request = function() - return "GET /hello-world HTTP/1.1\r\n" .. - "Invalid Header: value\r\n" .. - "\r\n" -end \ No newline at end of file