I’m testing Caddy to potentially serve 200MB-1.5GB video files to multiple concurrent users.
I did tests with a 333MB mp4 video file with Apache Benchmark (AB).
I tested this 5 times on different servers:
ab -n 100 -c 20 http://localhost:2015/a.mp4
Here are results for “Requests per second” on Cloud VPS:
- 1 vCore(s) - 2.4 GHz - 2 GB RAM - 10 GB SSD: 10.55 [#/sec]
- 2 vCore(s) - 2.4 GHz - 8 GB RAM - 40 GB SSD: 10.13 [#/sec]
- 4 vCore(s) - 3.1 GHz - 8 GB RAM - 100 GB (non-SSD): 10.35 [#/sec]
- 32 vCore(s) - 3.1 GHz - 120 GB RAM - 800 GB (SSD): 19.79 [#/sec]
The delay is always because of “processing” as I’m local on the machine. Results of tests 1 to 3 are close and the minor variations can probably be disregarded. It’s as if I passed another threshold with the last server.
I’m using CentOs 7 with a minimal install with only Caddy installed (using a post install script to rinse and repeat tests).
Do you have any suggestions on how to potentially improve requests per second in Caddy or by a server config?
Caddy’s scaling with some type of files seems limited or maybe I’m missing a configuration option?
Could a caching tool help with such files?
I’ve tested with an html file as well as a small jpg and performance seems to scale really well with those type of files.