dart-server-nano

A light, fast, and friendly server written in Dart.

MIT License

Stars
23
Committers
1

Bot releases are hidden (Show)

dart-server-nano - This shit is fast as hell Latest Release

Published by jonataslaw 6 months ago

-Upgrade codebase.

Here is the result of a benchmark done on a macbook pro m1.

@MacBook-Pro dart-server % wrk -t 6 -c 120 -d 10s --latency http://localhost:3000/
Running 10s test @ http://localhost:3000/
  6 threads and 120 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     1.92ms    4.66ms 126.59ms   95.70%
    Req/Sec    17.22k     3.79k   88.09k    90.02%
  Latency Distribution
     50%    0.98ms
     75%    1.46ms
     90%    2.65ms
     99%   22.92ms
  1029931 requests in 10.10s, 214.12MB read
Requests/sec: 101972.97
Transfer/sec:     21.20MB

Just for reference, a node.js server with express running the same code:

@MacBook-Pro ~ % wrk -t 6 -c 120 -d 10s --latency http://localhost:3003/
Running 10s test @ http://localhost:3003/
  6 threads and 120 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    10.23ms   30.90ms 542.87ms   98.17%
    Req/Sec     2.99k   358.79     3.72k    89.92%
  Latency Distribution
     50%    6.24ms
     75%    6.91ms
     90%    8.13ms
     99%  164.88ms
  180310 requests in 10.10s, 43.85MB read
Requests/sec:  17848.16
Transfer/sec:      4.34MB

Maybe it's time for dart servers to become more popular.