Now, it's time to discuss the performance of our server. We use an HTTP benchmarking tool such as wrk ( by Will Glozer to help us in our investigation. To avoid confusion, we will take the simplest version of our server, as follows:

import 'dart:io';

main() {
  .bind(InternetAddress.ANY_IP_V4, 8080)
  .then((server) {
    server.listen((HttpRequest request) {
      // Response back to client
      request.response.write('Hello, world!');

We use this code with a benchmarking tool and keep the 512 concurrent connections open for 30 seconds, as shown in the following code:

./wrk -t1 –c256 -d30s

Here is the result of the preceding code:

Running 30s test @ ...

Get Dart: Scalable Application Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.