Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frameworks/roadrunner/.tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
erlang 29.0
erlang 29.0.1
2 changes: 1 addition & 1 deletion frameworks/roadrunner/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM erlang:29.0-alpine AS build
FROM erlang:29.0.1-alpine AS build
RUN apk add --no-cache ca-certificates git
WORKDIR /src
COPY rebar.config ./
Expand Down
2 changes: 1 addition & 1 deletion frameworks/roadrunner/rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{minimum_otp_vsn, "29"}.

{deps, [
{roadrunner, "0.2.3"},
{roadrunner, "0.3.0"},
{epgsql, "4.8.0"},
{pooler, "1.6.0"}
]}.
Expand Down
12 changes: 6 additions & 6 deletions frameworks/roadrunner/rebar.lock
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{"1.2.0",
[{<<"epgsql">>,{pkg,<<"epgsql">>,<<"4.8.0">>},0},
{<<"pooler">>,{pkg,<<"pooler">>,<<"1.6.0">>},0},
{<<"quic">>,{pkg,<<"quic">>,<<"1.4.3">>},1},
{<<"roadrunner">>,{pkg,<<"roadrunner">>,<<"0.2.3">>},0},
{<<"quic">>,{pkg,<<"quic">>,<<"1.5.0">>},1},
{<<"roadrunner">>,{pkg,<<"roadrunner">>,<<"0.3.0">>},0},
{<<"telemetry">>,{pkg,<<"telemetry">>,<<"1.4.2">>},1}]}.
[
{pkg_hash,[
{<<"epgsql">>, <<"C491B141B8C37BCE7B67F2079F168F339BB374A7CF9A286CB3B40AD1CD3FABE5">>},
{<<"pooler">>, <<"F4F33C94AB3AB82565A2E31CEA9EFE4149A160651F3707A0A2669BC54AAF81C8">>},
{<<"quic">>, <<"CCA828DB522AC67B638081D93562B463E84286C22655C3409C5746C302E177E5">>},
{<<"roadrunner">>, <<"2E8C89078229C8C1C6CE6C61535AA25796B19B8F6BC0F231822D90429F2F39FB">>},
{<<"quic">>, <<"BD72F84C9670F0F11BBA4C950B88A9C199E80DA1EE3DD97D847D7E91FC679829">>},
{<<"roadrunner">>, <<"A933EC139ECF6A7AE99D6A4EC5AB8198DD31AD78D11049BB3AFFD1AEE4743576">>},
{<<"telemetry">>, <<"A0CB522801DFFB1C49FE6E30561BADFFC7B6D0E180DB1300DF759FAA22062855">>}]},
{pkg_hash_ext,[
{<<"epgsql">>, <<"00E550006A62FB439FC7E879419443C889C34605E9B9DC406029D8BAA1AD79D8">>},
{<<"pooler">>, <<"748C988FD2928DE9577C882A49621863CAB57809E3E1A88A14C9D3B55C6AB877">>},
{<<"quic">>, <<"A12FFEDC8AD8A41D303083C306DEA76141FAB3A54DF8DC0C5E5691FA40E8E619">>},
{<<"roadrunner">>, <<"0D92EB77420775D3CCBD5E8691FA72D1B0A7A88C114DAC84E37D57D31BFE74F9">>},
{<<"quic">>, <<"97D7BCE70FE9056E5CFFF35C346AC9E27DB6B380B0DC949BB3A752FD1E2A20E9">>},
{<<"roadrunner">>, <<"369118C401DCE0F8B24C340ABC6B04C27C97EA5A5E3154081F4075AE13AEFA37">>},
{<<"telemetry">>, <<"928F6495066506077862C0D1646609EED891A4326BEE3126BA54B60AF61FEBB1">>}]}
].
14 changes: 14 additions & 0 deletions frameworks/roadrunner/src/roadrunner_httparena_app.erl
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,22 @@ start(_StartType, _StartArgs) ->
_ = roadrunner_httparena_db:start_pool(),
ok = roadrunner_httparena_crud:init(),
Routes = roadrunner_httparena_handler:routes(),
%% Benchmark deployment tuning (adapt to the environment, allowed for
%% Production entries): roadrunner defaults to 150 concurrent connections
%% and rejects connections over the cap, but the HttpArena profiles drive
%% 512-16384 connections, so the default would throttle every high-conn
%% test. Size the connection cap above the largest profile. (The acceptor
%% pool is left at roadrunner's default of 10: a local sweep showed raising
%% it gives no throughput gain and costs memory, since acceptors only hand
%% accepted sockets to per-connection processes and share one listen
%% socket.)
MaxClients = 65536,
HttpPort = application:get_env(roadrunner_httparena, http_port, 8080),
{ok, _} = roadrunner:start_listener(httparena_http, #{
port => HttpPort,
routes => Routes,
middlewares => [roadrunner_compress],
max_clients => MaxClients,
%% 25 MB headroom for the upload profile (validator goes up to 20 MB).
max_content_length => 26214400,
%% Manual body buffering: handlers read the body themselves via
Expand All @@ -28,6 +39,7 @@ start(_StartType, _StartArgs) ->
port => H2cPort,
routes => Routes,
middlewares => [roadrunner_compress],
max_clients => MaxClients,
max_content_length => 26214400,
%% h2c prior-knowledge: `[http2]` on a plain-TCP listener
%% serves h2 directly (client sends the h2 preface, no
Expand All @@ -42,6 +54,7 @@ start(_StartType, _StartArgs) ->
port => TlsPort,
routes => Routes,
middlewares => [roadrunner_compress],
max_clients => MaxClients,
max_content_length => 26214400,
tls => TlsOpts,
body_buffering => manual
Expand All @@ -51,6 +64,7 @@ start(_StartType, _StartArgs) ->
port => H2Port,
routes => Routes,
middlewares => [roadrunner_compress],
max_clients => MaxClients,
max_content_length => 26214400,
tls => TlsOpts,
%% Listener derives `alpn_preferred_protocols` from
Expand Down
24 changes: 12 additions & 12 deletions site/data/api-16-1024.json
Original file line number Diff line number Diff line change
Expand Up @@ -828,28 +828,28 @@
{
"framework": "roadrunner",
"language": "Erlang",
"rps": 45279,
"avg_latency": "16.06ms",
"p99_latency": "102.30ms",
"cpu": "1543.3%",
"memory": "349MiB",
"rps": 42207,
"avg_latency": "22.60ms",
"p99_latency": "115.50ms",
"cpu": "1497.2%",
"memory": "262MiB",
"connections": 1024,
"threads": 64,
"duration": "5s",
"pipeline": 1,
"bandwidth": "229.31MB/s",
"input_bw": "2.55MB/s",
"reconnects": 240700,
"status_2xx": 679188,
"bandwidth": "213.31MB/s",
"input_bw": "2.37MB/s",
"reconnects": 126556,
"status_2xx": 633111,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0,
"tpl_baseline": 253791,
"tpl_json": 255613,
"tpl_baseline": 237430,
"tpl_json": 237348,
"tpl_db": 0,
"tpl_upload": 0,
"tpl_static": 0,
"tpl_async_db": 169784
"tpl_async_db": 158333
},
{
"framework": "roda",
Expand Down
24 changes: 12 additions & 12 deletions site/data/api-4-256.json
Original file line number Diff line number Diff line change
Expand Up @@ -828,28 +828,28 @@
{
"framework": "roadrunner",
"language": "Erlang",
"rps": 18246,
"avg_latency": "13.34ms",
"p99_latency": "60.40ms",
"cpu": "401.1%",
"memory": "163MiB",
"rps": 16242,
"avg_latency": "14.99ms",
"p99_latency": "69.70ms",
"cpu": "396.4%",
"memory": "155MiB",
"connections": 256,
"threads": 64,
"duration": "5s",
"pipeline": 1,
"bandwidth": "92.24MB/s",
"input_bw": "1.03MB/s",
"reconnects": 54719,
"status_2xx": 273702,
"bandwidth": "82.09MB/s",
"input_bw": "935.82KB/s",
"reconnects": 48711,
"status_2xx": 243631,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0,
"tpl_baseline": 102560,
"tpl_json": 102650,
"tpl_baseline": 91337,
"tpl_json": 91331,
"tpl_db": 0,
"tpl_upload": 0,
"tpl_static": 0,
"tpl_async_db": 68492
"tpl_async_db": 60963
},
{
"framework": "roda",
Expand Down
18 changes: 9 additions & 9 deletions site/data/async-db-1024.json
Original file line number Diff line number Diff line change
Expand Up @@ -656,19 +656,19 @@
{
"framework": "roadrunner",
"language": "Erlang",
"rps": 84905,
"avg_latency": "2.16ms",
"p99_latency": "23.90ms",
"cpu": "5216.3%",
"memory": "629MiB",
"rps": 142135,
"avg_latency": "7.10ms",
"p99_latency": "16.70ms",
"cpu": "5454.6%",
"memory": "697MiB",
"connections": 1024,
"threads": 64,
"duration": "5s",
"pipeline": 1,
"bandwidth": "325.18MB/s",
"input_bw": "5.67MB/s",
"reconnects": 406796,
"status_2xx": 849051,
"bandwidth": "182.37MB/s",
"input_bw": "9.49MB/s",
"reconnects": 56555,
"status_2xx": 1421353,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0
Expand Down
18 changes: 9 additions & 9 deletions site/data/baseline-4096.json
Original file line number Diff line number Diff line change
Expand Up @@ -969,19 +969,19 @@
{
"framework": "roadrunner",
"language": "Erlang",
"rps": 687020,
"avg_latency": "263us",
"p99_latency": "959us",
"cpu": "5084.2%",
"memory": "307MiB",
"rps": 757877,
"avg_latency": "4.24ms",
"p99_latency": "8.89ms",
"cpu": "5992.9%",
"memory": "392MiB",
"connections": 4096,
"threads": 64,
"duration": "5s",
"pipeline": 1,
"bandwidth": "92.34MB/s",
"input_bw": "53.07MB/s",
"reconnects": 142406,
"status_2xx": 3435103,
"bandwidth": "101.87MB/s",
"input_bw": "58.54MB/s",
"reconnects": 2282,
"status_2xx": 3789385,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0
Expand Down
18 changes: 9 additions & 9 deletions site/data/baseline-512.json
Original file line number Diff line number Diff line change
Expand Up @@ -969,19 +969,19 @@
{
"framework": "roadrunner",
"language": "Erlang",
"rps": 771470,
"avg_latency": "209us",
"p99_latency": "432us",
"cpu": "6098.9%",
"memory": "315MiB",
"rps": 799249,
"avg_latency": "642us",
"p99_latency": "3.36ms",
"cpu": "6202.3%",
"memory": "254MiB",
"connections": 512,
"threads": 64,
"duration": "5s",
"pipeline": 1,
"bandwidth": "103.71MB/s",
"input_bw": "59.59MB/s",
"reconnects": 120430,
"status_2xx": 3857351,
"bandwidth": "107.45MB/s",
"input_bw": "61.74MB/s",
"reconnects": 3804,
"status_2xx": 3996249,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0
Expand Down
14 changes: 7 additions & 7 deletions site/data/baseline-h2-1024.json
Original file line number Diff line number Diff line change
Expand Up @@ -355,18 +355,18 @@
{
"framework": "roadrunner",
"language": "Erlang",
"rps": 472506,
"avg_latency": "30.87ms",
"p99_latency": "30.87ms",
"cpu": "6229.1%",
"memory": "587MiB",
"rps": 447930,
"avg_latency": "171.56ms",
"p99_latency": "171.56ms",
"cpu": "6242.3%",
"memory": "910MiB",
"connections": 1024,
"threads": 64,
"duration": "5s",
"pipeline": 1,
"bandwidth": "11.43MB/s",
"bandwidth": "10.84MB/s",
"reconnects": 0,
"status_2xx": 2395610,
"status_2xx": 2262051,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0
Expand Down
14 changes: 7 additions & 7 deletions site/data/baseline-h2-256.json
Original file line number Diff line number Diff line change
Expand Up @@ -355,18 +355,18 @@
{
"framework": "roadrunner",
"language": "Erlang",
"rps": 464149,
"avg_latency": "31.63ms",
"p99_latency": "31.63ms",
"cpu": "6401.6%",
"memory": "560MiB",
"rps": 456364,
"avg_latency": "53.95ms",
"p99_latency": "53.95ms",
"cpu": "6472.0%",
"memory": "526MiB",
"connections": 256,
"threads": 64,
"duration": "5s",
"pipeline": 1,
"bandwidth": "11.14MB/s",
"bandwidth": "10.96MB/s",
"reconnects": 0,
"status_2xx": 2334672,
"status_2xx": 2295513,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0
Expand Down
14 changes: 7 additions & 7 deletions site/data/baseline-h2c-1024.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,18 @@
{
"framework": "roadrunner",
"language": "Erlang",
"rps": 887621,
"avg_latency": "16.49ms",
"p99_latency": "16.49ms",
"cpu": "6263.1%",
"memory": "583MiB",
"rps": 736621,
"avg_latency": "133.66ms",
"p99_latency": "133.66ms",
"cpu": "6402.5%",
"memory": "915MiB",
"connections": 1024,
"threads": 64,
"duration": "5s",
"pipeline": 1,
"bandwidth": "20.56MB/s",
"bandwidth": "17.20MB/s",
"reconnects": 0,
"status_2xx": 4482487,
"status_2xx": 3727304,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0
Expand Down
14 changes: 7 additions & 7 deletions site/data/baseline-h2c-256.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,18 @@
{
"framework": "roadrunner",
"language": "Erlang",
"rps": 834328,
"avg_latency": "17.78ms",
"p99_latency": "17.78ms",
"cpu": "6297.9%",
"memory": "559MiB",
"rps": 801598,
"avg_latency": "31.43ms",
"p99_latency": "31.43ms",
"cpu": "6466.2%",
"memory": "533MiB",
"connections": 256,
"threads": 64,
"duration": "5s",
"pipeline": 1,
"bandwidth": "19.31MB/s",
"bandwidth": "18.61MB/s",
"reconnects": 0,
"status_2xx": 4196670,
"status_2xx": 4040054,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0
Expand Down
14 changes: 7 additions & 7 deletions site/data/baseline-h2c-4096.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,18 @@
{
"framework": "roadrunner",
"language": "Erlang",
"rps": 889727,
"avg_latency": "16.71ms",
"p99_latency": "16.71ms",
"cpu": "6107.1%",
"memory": "553MiB",
"rps": 656539,
"avg_latency": "388.24ms",
"p99_latency": "388.24ms",
"cpu": "6279.4%",
"memory": "1.9GiB",
"connections": 4096,
"threads": 64,
"duration": "5s",
"pipeline": 1,
"bandwidth": "20.73MB/s",
"bandwidth": "15.52MB/s",
"reconnects": 0,
"status_2xx": 4519816,
"status_2xx": 3341788,
"status_3xx": 0,
"status_4xx": 0,
"status_5xx": 0
Expand Down
Loading