Performance tracking and improvement

Hey,
using traefik v2.4 on docker swarm. is there a way to track performance and how many requests per second traefik can serve.
for example running simple ab test:
ab -c 100 -n 50000 https://traefik.local/dashboard/
times:

Concurrency Level:      100
Time taken for tests:   261.014 seconds
Complete requests:      50000
Failed requests:        0
Non-2xx responses:      50000
Total transferred:      8500000 bytes
HTML transferred:       850000 bytes
Requests per second:    191.56 [#/sec] (mean)
Time per request:       522.029 [ms] (mean)
Time per request:       5.220 [ms] (mean, across all concurrent requests)
Transfer rate:          31.80 [Kbytes/sec] received

as I understand traefik was able to receive
191.56 [#/sec]

any way to improve? any configuration options or maybe I am doing something wrong

Hello @renven,

Performance testing is extremely architecture dependant, and can be bottlenecked at a variety of places, such as networking, DNS lookup, TLS negotiation etc.

For example, are you just loading the dashboard? The dashboard is not optimized for performance, and is unlikely to be a good target. You may want to use a whoami image to test against.

You are also running 100 concurrent TLS sessions, each that require crypto keys to be generated. This is CPU dependant, and will rely on the processing power on both sides of the connection.

If you are looking at improving performance, I would look at using metrics and tracing to determine what bottlenecks your applications are encountering, and then working on reducing those.

1 Like