Skip to content

[WTX] Add support for Unary TLS - #1055

Open
c410-f3r wants to merge 2 commits into
MDA2AV:mainfrom
c410-f3r:grpc-tls
Open

[WTX] Add support for Unary TLS#1055
c410-f3r wants to merge 2 commits into
MDA2AV:mainfrom
c410-f3r:grpc-tls

Conversation

@c410-f3r

Copy link
Copy Markdown
Contributor

Description

Reopening #993 now that #975 is fixed to see if it is possible to figure out what is going on

@c410-f3r
c410-f3r force-pushed the grpc-tls branch 6 times, most recently from 1f24929 to 93dab3f Compare July 26, 2026 20:21
@c410-f3r

Copy link
Copy Markdown
Contributor Author

Looks like validation tests don't map the "/certs" directory when running the image. Let's see.

@c410-f3r

Copy link
Copy Markdown
Contributor Author

/benchmark -f wtx-grpc-tls

@github-actions

Copy link
Copy Markdown
Contributor

👋 /benchmark request received. A collaborator will review and approve the run.

@github-actions

Copy link
Copy Markdown
Contributor

Benchmark Results

Framework: wtx-grpc-tls | Test: all tests

Test Conn RPS CPU Mem Δ RPS Δ Mem
unary-grpc-tls 256 2,394,077 6204.8% 530MiB NEW NEW
unary-grpc-tls 1024 2,280,487 6302.1% 901MiB NEW NEW
Full log
[info] skip: wtx-grpc-tls does not subscribe to upload
[info] skip: wtx-grpc-tls does not subscribe to api-4
[info] skip: wtx-grpc-tls does not subscribe to api-16
[info] skip: wtx-grpc-tls does not subscribe to static
[info] skip: wtx-grpc-tls does not subscribe to async-db
[info] skip: wtx-grpc-tls does not subscribe to crud
[info] skip: wtx-grpc-tls does not subscribe to fortunes
[info] skip: wtx-grpc-tls does not subscribe to baseline-h2
[info] skip: wtx-grpc-tls does not subscribe to static-h2
[info] skip: wtx-grpc-tls does not subscribe to baseline-h2c
[info] skip: wtx-grpc-tls does not subscribe to json-h2c
[info] skip: wtx-grpc-tls does not subscribe to baseline-h3
[info] skip: wtx-grpc-tls does not subscribe to static-h3
[info] skip: wtx-grpc-tls does not subscribe to gateway-64
[info] skip: wtx-grpc-tls does not subscribe to gateway-h3
[info] skip: wtx-grpc-tls does not subscribe to production-stack
[info] skip: wtx-grpc-tls does not subscribe to unary-grpc

==============================================
=== wtx-grpc-tls / unary-grpc-tls / 256c (tool=h2load) ===
==============================================
[info] waiting for server...
[info] gRPC server ready

[run 1/3]
starting benchmark...
22.Main benchmark duration is started for thread #5.
.

13.
10.
TLS Protocol: TLSv1.3
Cipher: TLS_AES_128_GCM_SHA256
Server Temp Key: X25519 253 bits
Application protocol: h2
.

52. Stopping all clients.

finished in 5.04s, 2302246.60 req/s, 98.81MB/s
requests: 11511233 total, 11536833 started, 11511233 done, 11511233 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 11511259 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 494.03MB (518023261) total, 296.41MB (310803681) headers (space savings 46.00%), 0B (0) data
                     min         max         mean         sd        +/- sd
time for request:      415us    206.70ms     11.64ms     10.09ms    93.42%
time for connect:     2.43ms     57.01ms     16.31ms      8.20ms    69.14%
time to 1st byte:     7.19ms    218.39ms     84.61ms     41.80ms    64.45%
req/s           :    2939.56    29351.74     8990.30     4327.55    83.59%
[info] CPU 5761.8% | Mem 490MiB

[run 2/3]
starting benchmark...
TLS Protocol: TLSv1.3
Cipher: TLS_AES_128_GCM_SHA256
Server Temp Key: X25519 253 bits
Application protocol: h2
8
45. Stopping all clients.

finished in 5.04s, 2413224.40 req/s, 103.57MB/s
requests: 12066122 total, 12091722 started, 12066122 done, 12066122 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 12066153 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 517.84MB (542993386) total, 310.69MB (325785759) headers (space savings 46.00%), 0B (0) data
                     min         max         mean         sd        +/- sd
time for request:      481us    259.98ms     10.00ms      5.11ms    69.81%
time for connect:     3.16ms     25.77ms     12.80ms      5.55ms    62.89%
time to 1st byte:    10.22ms     58.85ms     24.13ms      6.11ms    78.91%
req/s           :    4559.45    30547.52     9423.62     4526.37    85.55%
[info] CPU 6204.8% | Mem 530MiB

[run 3/3]
starting benchmark...
23Main benchmark duration is started for thread #14.
.
TLS Protocol: TLSv1.3
Cipher: TLS_AES_128_GCM_SHA256
Server Temp Key: X25519 253 bits
Application protocol: h2
.
57.
29. Stopping all clients.

finished in 5.03s, 2405126.00 req/s, 103.22MB/s
requests: 12025630 total, 12051230 started, 12025630 done, 12025630 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 12025658 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 516.10MB (541171174) total, 309.65MB (324692430) headers (space savings 46.00%), 0B (0) data
                     min         max         mean         sd        +/- sd
time for request:      479us    215.10ms     10.10ms      5.05ms    70.35%
time for connect:     4.54ms     30.96ms     14.89ms      5.84ms    60.16%
time to 1st byte:    18.23ms     51.27ms     26.11ms      4.34ms    70.31%
req/s           :    5084.28    29987.41     9392.17     4121.04    88.28%
[info] CPU 6141.4% | Mem 548MiB

=== Best: 2394077 req/s (CPU: 6204.8%, Mem: 530MiB) ===
[info] saved results/unary-grpc-tls/256/wtx-grpc-tls.json
httparena-bench-wtx-grpc-tls
httparena-bench-wtx-grpc-tls

==============================================
=== wtx-grpc-tls / unary-grpc-tls / 1024c (tool=h2load) ===
==============================================
[info] waiting for server...
[info] gRPC server ready

[run 1/3]
starting benchmark...
.
51Main benchmark duration is started for thread #39.
.Warm-up phase is over for thread #
8.
6.
progress: Warm-up phase is over for thread #9.93
% of clients startedMain benchmark duration is started for thread #9.
3.
TLS Protocol: TLSv1.3
Cipher: TLS_AES_128_GCM_SHA256
Server Temp Key: X25519 253 bits
Application protocol: h2


34
22. Stopping all clients.

finished in 5.07s, 2212805.40 req/s, 94.98MB/s
requests: 11064027 total, 11166427 started, 11064027 done, 11064027 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 11064048 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 474.88MB (497950327) total, 284.89MB (298729044) headers (space savings 46.00%), 0B (0) data
                     min         max         mean         sd        +/- sd
time for request:      531us    824.81ms     50.44ms     40.68ms    92.90%
time for connect:     4.21ms    135.61ms     59.49ms     34.58ms    55.08%
time to 1st byte:     7.82ms    561.59ms    277.85ms    134.50ms    59.96%
req/s           :    1317.89     3702.84     2159.47      563.10    74.22%
[info] CPU 5891.1% | Mem 851MiB

[run 2/3]
starting benchmark...
TLS Protocol: TLSv1.3
Cipher: TLS_AES_128_GCM_SHA256
Server Temp Key: X25519 253 bits
Application protocol: h2
.

34.

54.
38.
.
45.
38

finished in 5.07s, 2312406.40 req/s, 99.25MB/s
requests: 11562032 total, 11664432 started, 11562032 done, 11562032 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 11562073 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 496.25MB (520361032) total, 297.71MB (312175479) headers (space savings 46.00%), 0B (0) data
                     min         max         mean         sd        +/- sd
time for request:      482us       1.24s     41.74ms     18.26ms    76.88%
time for connect:     3.98ms    118.28ms     53.20ms     31.43ms    56.93%
time to 1st byte:    36.57ms    319.06ms    114.45ms     33.59ms    79.10%
req/s           :    1378.46     9426.33     2256.53      698.57    85.64%
[info] CPU 6302.1% | Mem 901MiB

[run 3/3]
starting benchmark...
.
TLS Protocol: TLSv1.3
Cipher: TLS_AES_128_GCM_SHA256
Server Temp Key: X25519 253 bits
Application protocol: h2
44.
45.Main benchmark duration is started for thread #39.
9.

15

finished in 5.07s, 2300195.60 req/s, 98.73MB/s
requests: 11500978 total, 11603378 started, 11500978 done, 11500978 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 11501007 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 493.63MB (517613314) total, 296.14MB (310526841) headers (space savings 46.00%), 0B (0) data
                     min         max         mean         sd        +/- sd
time for request:     1.51ms    977.40ms     42.65ms     18.83ms    74.95%
time for connect:     4.26ms    109.99ms     48.34ms     30.15ms    55.76%
time to 1st byte:    23.14ms    249.19ms    105.07ms     36.84ms    72.17%
req/s           :    1357.02     4863.62     2244.36      637.36    78.71%
[info] CPU 5856.2% | Mem 918MiB

=== Best: 2280487 req/s (CPU: 6302.1%, Mem: 901MiB) ===
[info] saved results/unary-grpc-tls/1024/wtx-grpc-tls.json
httparena-bench-wtx-grpc-tls
httparena-bench-wtx-grpc-tls
[info] skip: wtx-grpc-tls does not subscribe to stream-grpc
[info] skip: wtx-grpc-tls does not subscribe to stream-grpc-tls
[info] skip: wtx-grpc-tls does not subscribe to echo-ws
[info] skip: wtx-grpc-tls does not subscribe to echo-ws-pipeline
[info] skip: wtx-grpc-tls does not subscribe to echo-ws-limited
[info] rebuilding site/data/*.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/frameworks.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/results/wtx.json - 2 new, 17 total
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/current.json
[info] done
[info] restoring loopback MTU to 65536

@c410-f3r

c410-f3r commented Jul 26, 2026

Copy link
Copy Markdown
Contributor Author
grpc_needs_tls=false
if has_test "unary-grpc-tls" || has_test "stream-grpc-tls"; then
    grpc_needs_tls=true
fi

Even after injecting TLS certificates the validation test still doesn't work -> https://github.com/MDA2AV/HttpArena/actions/runs/30222679120/job/89847685310

Well, I guess I will just stay with the actual benchmarks.

@c410-f3r

Copy link
Copy Markdown
Contributor Author

/benchmark -f wtx-grpc-tls --save

@github-actions

Copy link
Copy Markdown
Contributor

👋 /benchmark request received. A collaborator will review and approve the run.

@github-actions

Copy link
Copy Markdown
Contributor

Benchmark Results

Framework: wtx-grpc-tls | Test: all tests

Test Conn RPS CPU Mem Δ RPS Δ Mem
unary-grpc-tls 256 2,409,735 6207.2% 542MiB NEW NEW
unary-grpc-tls 1024 2,371,712 6417.3% 904MiB NEW NEW
Full log
Server Temp Key: X25519 253 bits
Application protocol: h2
.
28Main benchmark duration is started for thread #41.
.

finished in 5.04s, 2362395.80 req/s, 101.39MB/s
requests: 11811979 total, 11837579 started, 11811979 done, 11811979 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 11812001 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 506.93MB (531556735) total, 304.15MB (318923763) headers (space savings 46.00%), 0B (0) data
                     min         max         mean         sd        +/- sd
time for request:      428us    165.74ms     11.34ms      9.98ms    93.75%
time for connect:     2.07ms     83.15ms     17.85ms     14.02ms    90.23%
time to 1st byte:    14.72ms    184.30ms     85.38ms     42.70ms    59.38%
req/s           :    4038.28    29336.71     9224.78     4843.16    85.16%
[info] CPU 5898.8% | Mem 500MiB

[run 2/3]
starting benchmark...
TLS Protocol: TLSv1.3
Cipher: TLS_AES_128_GCM_SHA256
Server Temp Key: X25519 253 bits
Application protocol: h2
.

finished in 5.04s, 2429008.80 req/s, 104.25MB/s
requests: 12145044 total, 12170644 started, 12145044 done, 12145044 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 12145065 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 521.23MB (546544636) total, 312.73MB (327916503) headers (space savings 46.00%), 0B (0) data
                     min         max         mean         sd        +/- sd
time for request:      427us    328.46ms     10.27ms      5.87ms    80.32%
time for connect:     2.16ms     28.69ms     14.51ms      6.46ms    57.81%
time to 1st byte:    13.93ms     51.86ms     26.99ms      4.75ms    77.73%
req/s           :    4073.13    27021.06     9484.87     3994.14    80.08%
[info] CPU 6207.2% | Mem 542MiB

[run 3/3]
starting benchmark...

TLS Protocol: TLSv1.3
Cipher: TLS_AES_128_GCM_SHA256
Server Temp Key: X25519 253 bits
Application protocol: h2


finished in 5.04s, 2427260.20 req/s, 104.17MB/s
requests: 12136301 total, 12161901 started, 12136301 done, 12136301 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 12136323 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 520.85MB (546151225) total, 312.50MB (327680457) headers (space savings 46.00%), 0B (0) data
                     min         max         mean         sd        +/- sd
time for request:      492us    303.85ms      9.79ms      4.55ms    68.88%
time for connect:     2.89ms     26.50ms     14.28ms      6.31ms    59.38%
time to 1st byte:    15.51ms     37.42ms     25.52ms      3.91ms    68.75%
req/s           :    5134.87    27508.53     9478.11     3748.76    77.34%
[info] CPU 5998.7% | Mem 554MiB

=== Best: 2409735 req/s (CPU: 6207.2%, Mem: 542MiB) ===
[info] saved results/unary-grpc-tls/256/wtx-grpc-tls.json
httparena-bench-wtx-grpc-tls
httparena-bench-wtx-grpc-tls

==============================================
=== wtx-grpc-tls / unary-grpc-tls / 1024c (tool=h2load) ===
==============================================
[info] waiting for server...
[info] gRPC server ready

[run 1/3]
starting benchmark...
39.
59Main benchmark duration is started for thread #.
20Warm-up phase is over for thread #Warm-up phase is over for thread #4921.Warm-up phase is over for thread #
2progress: .Main benchmark duration is started for thread #75
49Main benchmark duration is started for thread #2..
% of clients started

.
28.
.Warm-up phase is over for thread #
60.Main benchmark duration is started for thread #28
.Main benchmark duration is started for thread #Warm-up phase is over for thread #Warm-up phase is over for thread #Main benchmark duration is started for thread #Warm-up phase is over for thread #5838Warm-up phase is over for thread #27.60
.
46progress: 42.
81Main benchmark duration is started for thread #27.
.

% of clients started.

progress: 87Warm-up phase is over for thread #57.

36.
% of clients started
.Warm-up phase is over for thread #
35Main benchmark duration is started for thread #.38
.
TLS Protocol: TLSv1.3
Cipher: TLS_AES_128_GCM_SHA256
Server Temp Key: X25519 253 bits
Application protocol: h2
63. Stopping all clients.
61Stopped all clients for thread #25
. Stopping all clients.
. Stopping all clients.Stopped all clients for thread #37

6. Stopping all clients.

finished in 5.07s, 2264486.40 req/s, 97.19MB/s
requests: 11322432 total, 11424832 started, 11322432 done, 11322432 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 11322453 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 485.97MB (509578552) total, 291.54MB (305705979) headers (space savings 46.00%), 0B (0) data
                     min         max         mean         sd        +/- sd
time for request:      699us    976.78ms     49.13ms     36.38ms    92.15%
time for connect:     4.24ms    113.07ms     54.50ms     30.95ms    56.15%
time to 1st byte:     5.34ms    497.59ms    248.71ms    118.81ms    56.84%
req/s           :    1338.89     4607.67     2209.54      553.42    66.80%
[info] CPU 5780.5% | Mem 854MiB

[run 2/3]
starting benchmark...
.Warm-up phase is over for thread #33.

5724.Main benchmark duration is started for thread #26.



61.

progress: Main benchmark duration is started for thread #31.
56% of clients started
.
17Warm-up phase is over for thread #Main benchmark duration is started for thread #53.
.
45Main benchmark duration is started for thread #.
32Main benchmark duration is started for thread #45.
.
TLS Protocol: TLSv1.3
Cipher: TLS_AES_128_GCM_SHA256
Server Temp Key: X25519 253 bits
Application protocol: h2
. Stopping all clients.Stopped all clients for thread #60

. Stopping all clients.

finished in 5.06s, 2400169.00 req/s, 103.02MB/s
requests: 12000845 total, 12103245 started, 12000845 done, 12000845 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 12000866 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 515.09MB (540107137) total, 309.01MB (324023130) headers (space savings 46.00%), 0B (0) data
                     min         max         mean         sd        +/- sd
time for request:     2.02ms       1.17s     39.56ms     17.09ms    79.13%
time for connect:     4.67ms    116.24ms     53.68ms     31.01ms    56.74%
time to 1st byte:    38.25ms    173.80ms    111.21ms     24.84ms    78.81%
req/s           :    1568.77     5470.50     2341.95      642.34    80.66%
[info] CPU 6417.3% | Mem 904MiB

[run 3/3]
starting benchmark...
3.
TLS Protocol: TLSv1.3
Cipher: TLS_AES_128_GCM_SHA256
Server Temp Key: X25519 253 bits
Application protocol: h2
10.
44Main benchmark duration is started for thread #40.
.
.
11Main benchmark duration is started for thread #24.
.
48.
.
33.
1816. Stopping all clients.. Stopping all clients.

55

finished in 5.06s, 2333162.80 req/s, 100.14MB/s
requests: 11665814 total, 11768214 started, 11665814 done, 11665814 succeeded, 0 failed, 0 errored, 0 timeout
status codes: 11665839 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 500.71MB (525030838) total, 300.39MB (314977353) headers (space savings 46.00%), 0B (0) data
                     min         max         mean         sd        +/- sd
time for request:      363us    215.27ms     42.87ms     19.77ms    81.21%
time for connect:     4.44ms    118.68ms     55.55ms     32.11ms    57.03%
time to 1st byte:    33.57ms    272.78ms    122.12ms     35.69ms    79.00%
req/s           :    1479.34     3858.78     2276.52      542.32    74.71%
[info] CPU 5766.6% | Mem 919MiB

=== Best: 2371712 req/s (CPU: 6417.3%, Mem: 904MiB) ===
[info] saved results/unary-grpc-tls/1024/wtx-grpc-tls.json
httparena-bench-wtx-grpc-tls
httparena-bench-wtx-grpc-tls
[info] skip: wtx-grpc-tls does not subscribe to stream-grpc
[info] skip: wtx-grpc-tls does not subscribe to stream-grpc-tls
[info] skip: wtx-grpc-tls does not subscribe to echo-ws
[info] skip: wtx-grpc-tls does not subscribe to echo-ws-pipeline
[info] skip: wtx-grpc-tls does not subscribe to echo-ws-limited
[info] rebuilding site/data/*.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/frameworks.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/results/wtx.json - 2 new, 17 total
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/current.json
[info] done
[info] restoring loopback MTU to 65536

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant