# Traefik performance lags behind nginx and caddy

**URL:** <https://community.traefik.io/t/traefik-performance-lags-behind-nginx-and-caddy/28919>\
**Category:** Traefik v3 (latest)\
**Tags:** docker\
**Created:** [October 23, 2025, 2:19pm UTC](https://community.traefik.io/t/traefik-performance-lags-behind-nginx-and-caddy/28919 "2025-10-23T14:19:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kayson](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/kayson/32/894_2.png) [@kayson](https://community.traefik.io/u/kayson)\
**Post date:** [October 23, 2025, 2:19pm UTC](https://community.traefik.io/t/traefik-performance-lags-behind-nginx-and-caddy/28919/1 "2025-10-23T14:19:59Z")

</div>

Was debating whether or not to make this a GitHub issue but figured I'd start here. Ran across this the other day: [Reddit - The heart of the internet](https://www.reddit.com/r/selfhosted/comments/1odh46j/nginx_vs_caddy_vs_traefik_benchmark_results/)

(also: [https://github.com/milan090/benchmark-servers](https://github.com/milan090/benchmark-servers))

Wondering if it's something about the configuration or it's really just not as performant. Would be great to get some eyes on this!

---

<div class="post-metadata">

**Author:** ![wwe](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/wwe/32/8932_2.png) [@wwe](https://community.traefik.io/u/wwe)\
**Post date:** [November 3, 2025, 9:50pm UTC](https://community.traefik.io/t/traefik-performance-lags-behind-nginx-and-caddy/28919/2 "2025-11-03T21:50:51Z")

</div>

It’s hard to say anything without details about your hardware and config. but IMO performance of 10 or 20% is not everything as long you don't run a hyperscaler infrastructure (and if you do you are likely wrong to ask for help in community forum). but yes traefik team is working on new “FastProxy” engine to improve performance

- [Traefik FastProxy Experimental Configuration - Traefik](https://doc.traefik.io/traefik/user-guides/fastproxy/)
- [Traefik v3.2 - A Munster Release](https://traefik.io/blog/traefik-proxy-v3-2-a-munster-release)

I enabled it and my immediate feeling is like my Nextcloud works much snappier now.. but it's just a feeling - now numbers.

---

<div class="post-metadata">

**Author:** ![kayson](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/kayson/32/894_2.png) [@kayson](https://community.traefik.io/u/kayson)\
**Post date:** [November 3, 2025, 10:51pm UTC](https://community.traefik.io/t/traefik-performance-lags-behind-nginx-and-caddy/28919/3 "2025-11-03T22:51:52Z")

</div>

Agreed it’s not likely to matter for small scales, but it still seems worth investigating and fixing. A 2x higher response latency is huge. 90th percentile is 3x, and 99th, 4x. Memory usage is \>2X higher!

I think it’s interesting that the CPU is capped at 1 core, and all the proxies fully loaded that core. I wonder if traefik is somehow less CPU efficient.

The config is available in the author’s github repo linked in OP. It is using v2, though, which is surprising given that it’s 2 weeks old.

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [November 4, 2025, 12:59pm UTC](https://community.traefik.io/t/traefik-performance-lags-behind-nginx-and-caddy/28919/4 "2025-11-04T12:59:14Z")

</div>

As a long-time Traefik user I wanted to verify the data myself. We mainly use Traefik because of it's great configuration discovery with Docker Swarm.

I got a new 4 vCPU (dedicated) AMD Debian server with 16GB RAM and 160GB SSD. In my initial testing Caddy was always a bit slower than Traefik, so my results are different from OPs.

Plain run (from Github):

```
Metric Nginx Caddy Traefik HAProxy
--------------------------------------------------------------------------------------------------------------
Requests/sec 25534.59 14966.04 18345.86 26248.37
Avg Latency (ms) 3.91 6.76 5.49 3.79
50th Percentile (ms) 3.82 6.27 5.16 3.71
75th Percentile (ms) 4.69 8.73 6.78 4.57
90th Percentile (ms) 5.61 11.35 8.61 5.45
99th Percentile (ms) 7.88 16.40 13.46 7.45
Total Requests 766,981 449,572 551,367 790,062

```

Another run with Traefik compression disabled and custom settings removed. To my knowledge nginx does not compress by default.

```
Metric Nginx Caddy Traefik HAProxy
--------------------------------------------------------------------------------------------------------------
Requests/sec 25636.36 14931.26 18976.50 25499.51
Avg Latency (ms) 3.95 6.82 5.37 3.96
50th Percentile (ms) 3.79 6.29 4.99 3.81
75th Percentile (ms) 4.69 8.76 6.55 4.71
90th Percentile (ms) 5.66 11.36 8.32 5.67
99th Percentile (ms) 8.26 16.74 13.30 8.08
Total Requests 771,642 448,479 570,175 765,657

```

Another run with Traefik updated to latest v3 :

```
Metric Nginx Caddy Traefik HAProxy
--------------------------------------------------------------------------------------------------------------
Requests/sec 25426.58 14930.24 18290.52 25879.90
Avg Latency (ms) 3.95 6.84 5.60 3.93
50th Percentile (ms) 3.84 6.27 5.16 3.75
75th Percentile (ms) 4.71 8.78 6.80 4.64
90th Percentile (ms) 5.62 11.42 8.70 5.56
99th Percentile (ms) 7.97 16.91 14.28 8.02
Total Requests 763,535 448,316 549,388 778,968

```

Traefik v3 with enabled FastProxy :

```
Metric Nginx Caddy Traefik HAProxy
--------------------------------------------------------------------------------------------------------------
Requests/sec 26380.17 15051.84 20795.49 25948.55
Avg Latency (ms) 3.84 6.84 4.86 3.96
50th Percentile (ms) 3.68 6.24 4.56 3.73
75th Percentile (ms) 4.54 8.69 5.94 4.65
90th Percentile (ms) 5.45 11.30 7.49 5.63
99th Percentile (ms) 7.93 16.84 11.84 8.25
Total Requests 792,421 452,070 625,799 779,167

```

Just for fun I changed the load to fibonacci?n=10 :

```
Metric Nginx Caddy Traefik HAProxy
--------------------------------------------------------------------------------------------------------------
Requests/sec 25367.56 13573.39 20712.92 24262.62
Avg Latency (ms) 3.93 7.45 4.85 4.12
50th Percentile (ms) 3.84 6.94 4.58 4.01
75th Percentile (ms) 4.73 9.64 5.97 4.99
90th Percentile (ms) 5.67 12.51 7.54 6.01
99th Percentile (ms) 7.94 18.08 11.54 8.43
Total Requests 762,070 407,578 622,357 728,559

```

So for the very specific workload and access pattern it seems nginx and haproxy are doing very well, but I am not sure if those results can be generalized for any kind of workload.

 ![graphs](https://us1.discourse-cdn.com/flex020/uploads/containo/original/2X/c/cecb84e91aee4f481be29a5543cfd788c6660079.jpeg)

---

<div class="post-metadata">

**Author:** ![kayson](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/kayson/32/894_2.png) [@kayson](https://community.traefik.io/u/kayson)\
**Post date:** [November 4, 2025, 7:30pm UTC](https://community.traefik.io/t/traefik-performance-lags-behind-nginx-and-caddy/28919/5 "2025-11-04T19:30:51Z")

</div>

Thanks for running it with v3 and FastProxy! Interesting to see it does help close the gap quite a bit.

If you’re up for it - I’m curious what would happen if you changed the 1-CPU limit in docker-compose? Do the proxies use more CPU and increase througput?

---

<div class="post-metadata">

**Author:** ![m1cha](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/m1cha/32/10864_2.png) [@m1cha](https://community.traefik.io/u/m1cha)\
**Post date:** [November 7, 2025, 3:04pm UTC](https://community.traefik.io/t/traefik-performance-lags-behind-nginx-and-caddy/28919/6 "2025-11-07T15:04:12Z")

</div>

That’s very interesting, because this benchmark from 2023 shows the exact opposite: [GitHub - NickMRamirez/Proxy-Benchmarks: Benchmarks for several proxies](https://github.com/NickMRamirez/Proxy-Benchmarks)

There, nginx and haproxy are also the fastest, but then traefik is much faster than caddy.

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [November 8, 2025, 8:09am UTC](https://community.traefik.io/t/traefik-performance-lags-behind-nginx-and-caddy/28919/7 "2025-11-08T08:09:35Z")

</div>

As stated above, Traefik is still faster than caddy. I just ran the provided benchmark on a different server.
