Skip to content

Commit 4b0e224

Browse files
authored
feat: create rejection scenarios for HTTP.SYS and Kestrel (#2055)
1 parent 4c1176c commit 4b0e224

File tree

1 file changed

+121
-0
lines changed

1 file changed

+121
-0
lines changed

scenarios/rejection.benchmarks.yml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# Contains test to compare HTTP.SYS and Kestrel performance on some specific scenarios,
2+
# where servers (probably) should reject the request early (i.e. mismatching `Host` header)
3+
# to make request processing as performant as possible
4+
5+
imports:
6+
- https://raw.githubusercontent.com/dotnet/crank/main/src/Microsoft.Crank.Jobs.Bombardier/bombardier.yml
7+
- https://github.com/aspnet/Benchmarks/blob/main/scenarios/aspnet.profiles.yml?raw=true
8+
9+
variables:
10+
serverPort: 5000
11+
12+
jobs:
13+
httpSysServer:
14+
source:
15+
repository: https://github.com/aspnet/benchmarks.git
16+
branchOrCommit: main
17+
project: src/BenchmarksApps/TLS/HttpSys/HttpSys.csproj
18+
readyStateText: Application started.
19+
variables:
20+
# behavioral settings
21+
mTLS: false # enables settings on http.sys to negotiate client cert on connections
22+
tlsRenegotiation: false # enables client cert validation
23+
# debug settings
24+
certValidationConsoleEnabled: false
25+
httpSysLogs: false
26+
statsEnabled: false
27+
logRequestDetails: false
28+
arguments: "--urls https://{{serverAddress}}:{{serverPort}} --mTLS {{mTLS}} --certValidationConsoleEnabled {{certValidationConsoleEnabled}} --statsEnabled {{statsEnabled}} --tlsRenegotiation {{tlsRenegotiation}} --httpSysLogs {{httpSysLogs}} --logRequestDetails {{logRequestDetails}}"
29+
30+
kestrelServer:
31+
source:
32+
repository: https://github.com/aspnet/benchmarks.git
33+
branchOrCommit: main
34+
project: src/BenchmarksApps/TLS/Kestrel/Kestrel.csproj
35+
readyStateText: Application started.
36+
variables:
37+
# behavioral settings
38+
mTLS: false
39+
tlsRenegotiation: false
40+
tlsProtocols: "tls12,tls13"
41+
# debug settings
42+
certValidationConsoleEnabled: false
43+
statsEnabled: false
44+
logRequestDetails: false
45+
arguments: "--urls https://{{serverAddress}}:{{serverPort}} --mTLS {{mTLS}} --certValidationConsoleEnabled {{certValidationConsoleEnabled}} --tlsProtocols {{tlsProtocols}} --statsEnabled {{statsEnabled}} --tlsRenegotiation {{tlsRenegotiation}} --logRequestDetails {{logRequestDetails}}"
46+
47+
scenarios:
48+
49+
# HTTP.SYS
50+
51+
httpsys-encoded-url:
52+
application:
53+
job: httpSysServer
54+
load:
55+
job: bombardier
56+
variables:
57+
path: /unknown/%09
58+
presetHeaders: connectionclose
59+
connections: 32
60+
serverScheme: https
61+
62+
httpsys-header-symbols:
63+
application:
64+
job: httpSysServer
65+
load:
66+
job: bombardier
67+
variables:
68+
path: /hello-world
69+
connections: 32
70+
serverScheme: https
71+
customHeaders:
72+
- X-Custom: "Québec"
73+
74+
httpsys-hostheader-mismatch:
75+
application:
76+
job: httpSysServer
77+
load:
78+
job: bombardier
79+
variables:
80+
path: /hello-world
81+
connections: 32
82+
serverScheme: https
83+
customHeaders:
84+
- Host: "google.com"
85+
86+
# Kestrel
87+
88+
kestrel-encoded-url:
89+
application:
90+
job: kestrelServer
91+
load:
92+
job: bombardier
93+
variables:
94+
path: /unknown/%09
95+
presetHeaders: connectionclose
96+
connections: 32
97+
serverScheme: https
98+
99+
kestrel-header-symbols:
100+
application:
101+
job: kestrelServer
102+
load:
103+
job: bombardier
104+
variables:
105+
path: /hello-world
106+
connections: 32
107+
serverScheme: https
108+
customHeaders:
109+
- X-Custom: "Québec"
110+
111+
kestrel-hostheader-mismatch:
112+
application:
113+
job: kestrelServer
114+
load:
115+
job: bombardier
116+
variables:
117+
path: /hello-world
118+
connections: 32
119+
serverScheme: https
120+
customHeaders:
121+
- Host: "google.com"

0 commit comments

Comments
 (0)