Skip to content

feat: add SSR performance showdown integration example#67

Merged
mohamedmansour merged 1 commit intomainfrom
feat/ssr-showdown
Mar 5, 2026
Merged

feat: add SSR performance showdown integration example#67
mohamedmansour merged 1 commit intomainfrom
feat/ssr-showdown

Conversation

@mohamedmansour
Copy link
Copy Markdown
Contributor

Add a Rust/actix-web server under examples/integration/ssr-performance-showdown that replicates the spiral-tile benchmark from the ssr-performance-showdown project (https://github.com/nicolo-ribaudo/ssr-performance-showdown).

The template (app/index.html) uses a loop over a tiles array and is compiled ahead of time into dist/protocol.bin via webui build. At startup the server loads the pre-built protocol binary. On every request it computes ~2400 spiral tile positions (matching the showdown parameters: 960x720 canvas, 10px cells, 0.2 angle step) and passes them as JSON state to WebUIHandler, which renders the final HTML.

This keeps the runtime dependency surface minimal — only webui-protocol and webui-handler are needed; the parser is not linked into the server binary.

Current benchmarks:

webui-rust

┌─────────┬───────┬───────┬───────┬───────┬──────────┬─────────┬───────┐
│ Stat    │ 2.5%  │ 50%   │ 97.5% │ 99%   │ Avg      │ Stdev   │ Max   │
├─────────┼───────┼───────┼───────┼───────┼──────────┼─────────┼───────┤
│ Latency │ 11 ms │ 18 ms │ 44 ms │ 52 ms │ 21.71 ms │ 9.57 ms │ 87 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴─────────┴───────┘
┌───────────┬────────┬────────┬────────┬────────┬─────────┬────────┬────────┐
│ Stat      │ 1%     │ 2.5%   │ 50%    │ 97.5%  │ Avg     │ Stdev  │ Min    │
├───────────┼────────┼────────┼────────┼────────┼─────────┼────────┼────────┤
│ Req/Sec   │ 2,987  │ 2,987  │ 4,623  │ 4,875  │ 4,511.3 │ 520.24 │ 2,986  │
├───────────┼────────┼────────┼────────┼────────┼─────────┼────────┼────────┤
│ Bytes/Sec │ 453 MB │ 453 MB │ 702 MB │ 740 MB │ 684 MB  │ 79 MB  │ 453 MB │
└───────────┴────────┴────────┴────────┴────────┴─────────┴────────┴────────┘

fastify-html

┌─────────┬───────┬───────┬────────┬────────┬──────────┬────────┬────────┐
│ Stat    │ 2.5%  │ 50%   │ 97.5%  │ 99%    │ Avg      │ Stdev  │ Max    │
├─────────┼───────┼───────┼────────┼────────┼──────────┼────────┼────────┤
│ Latency │ 87 ms │ 92 ms │ 107 ms │ 118 ms │ 93.42 ms │ 6.5 ms │ 135 ms │
└─────────┴───────┴───────┴────────┴────────┴──────────┴────────┴────────┘
┌───────────┬────────┬────────┬────────┬────────┬─────────┬───────┬────────┐
│ Stat      │ 1%     │ 2.5%   │ 50%    │ 97.5%  │ Avg     │ Stdev │ Min    │
├───────────┼────────┼────────┼────────┼────────┼─────────┼───────┼────────┤
│ Req/Sec   │ 915    │ 915    │ 1,075  │ 1,105  │ 1,060.7 │ 55.63 │ 915    │
├───────────┼────────┼────────┼────────┼────────┼─────────┼───────┼────────┤
│ Bytes/Sec │ 181 MB │ 181 MB │ 212 MB │ 218 MB │ 209 MB  │ 11 MB │ 181 MB │
└───────────┴────────┴────────┴────────┴────────┴─────────┴───────┴────────┘

react

┌─────────┬────────┬────────┬────────┬────────┬───────────┬──────────┬────────┐
│ Stat    │ 2.5%   │ 50%    │ 97.5%  │ 99%    │ Avg       │ Stdev    │ Max    │
├─────────┼────────┼────────┼────────┼────────┼───────────┼──────────┼────────┤
│ Latency │ 168 ms │ 180 ms │ 203 ms │ 210 ms │ 179.24 ms │ 16.77 ms │ 262 ms │
└─────────┴────────┴────────┴────────┴────────┴───────────┴──────────┴────────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬─────────┬────────┬─────────┐
│ Stat      │ 1%      │ 2.5%    │ 50%     │ 97.5%   │ Avg     │ Stdev  │ Min     │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼────────┼─────────┤
│ Req/Sec   │ 479     │ 479     │ 554     │ 573     │ 552     │ 25.95  │ 479     │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼────────┼─────────┤
│ Bytes/Sec │ 68.2 MB │ 68.2 MB │ 78.8 MB │ 81.5 MB │ 78.5 MB │ 3.7 MB │ 68.1 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴─────────┴────────┴─────────┘

Add a Rust/actix-web server under examples/integration/ssr-performance-showdown
that replicates the spiral-tile benchmark from the ssr-performance-showdown
project (https://github.com/nicolo-ribaudo/ssr-performance-showdown).

The template (app/index.html) uses a <for each> loop over a tiles array
and is compiled ahead of time into dist/protocol.bin via webui build.
At startup the server loads the pre-built protocol binary. On every
request it computes ~2400 spiral tile positions (matching the showdown
parameters: 960x720 canvas, 10px cells, 0.2 angle step) and passes
them as JSON state to WebUIHandler, which renders the final HTML.

This keeps the runtime dependency surface minimal — only webui-protocol
and webui-handler are needed; the parser is not linked into the server
binary.
@mohamedmansour mohamedmansour requested review from a team, akroshg and janechu March 5, 2026 07:29
@mohamedmansour mohamedmansour merged commit 0ea1b96 into main Mar 5, 2026
10 checks passed
@mohamedmansour mohamedmansour deleted the feat/ssr-showdown branch March 5, 2026 20:04
mohamedmansour added a commit that referenced this pull request Mar 5, 2026
Add a Rust/actix-web server under examples/integration/ssr-performance-showdown
that replicates the spiral-tile benchmark from the ssr-performance-showdown
project (https://github.com/nicolo-ribaudo/ssr-performance-showdown).

The template (app/index.html) uses a <for each> loop over a tiles array
and is compiled ahead of time into dist/protocol.bin via webui build.
At startup the server loads the pre-built protocol binary. On every
request it computes ~2400 spiral tile positions (matching the showdown
parameters: 960x720 canvas, 10px cells, 0.2 angle step) and passes
them as JSON state to WebUIHandler, which renders the final HTML.

This keeps the runtime dependency surface minimal — only webui-protocol
and webui-handler are needed; the parser is not linked into the server
binary.
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.

2 participants