Compare commits
No commits in common. "ef0464234a5841f711bf3ac841f4f990aadfd730" and "a64e7499bc651dee98b2d3b22e3303409b584875" have entirely different histories.
ef0464234a
...
a64e7499bc
10
README.md
10
README.md
@ -20,13 +20,11 @@ We use roadsign and nginx to host a same static file, and test them with [go-wrk
|
|||||||
Here's the result:
|
Here's the result:
|
||||||
|
|
||||||
| **Software** | Total Requests | Requests per Seconds | Transfer per Seconds | Avg Time | Fastest Time | Slowest Time | Errors Count |
|
| **Software** | Total Requests | Requests per Seconds | Transfer per Seconds | Avg Time | Fastest Time | Slowest Time | Errors Count |
|
||||||
|:---------------------:|:--------------:|:--------------------:|:--------------------:|:-----------:|:------------:|:------------:|:------------:|
|
|:---------------------:|----------------|:--------------------:|:--------------------:|:-----------:|:------------:|:------------:|:------------:|
|
||||||
| _Nginx_ | 515749 | 4299.58 | 2.05MB | 13.954846ms | 0s (Cached) | 410.6972ms | 0 |
|
| _Nginx_ | 515749 | 4299.58 | 2.05MB | 13.954846ms | 0s | 410.6972ms | 0 |
|
||||||
| _RoadSign_ | 8905230 | 76626.70 | 30.98MB | 783.016µs | 28.542µs | 46.773083ms | 0 |
|
| _RoadSign_ | 3256820 | 27265.90 | 12.27MB | 2.20055ms | 0s | 56.8726ms | 0 |
|
||||||
| _RoadSign w/ Prefork_ | 4784308 | 40170.41 | 16.24MB | 1.493636ms | 34.291µs | 8.727666ms | 0 |
|
| _RoadSign w/ Prefork_ | 2188594 | 18248.45 | 8.21MB | 3.287951ms | 0s | 121.5189ms | 0 |
|
||||||
|
|
||||||
As result, roadsign undoubtedly is the fastest one.
|
As result, roadsign undoubtedly is the fastest one.
|
||||||
|
|
||||||
It can be found that the prefork feature makes RoadSign more stable in concurrency. We can see this from the **Slowest Time**. At the same time, the **Fastest Time** is affected because reusing ports requires some extra steps to handle load balancing. Enable this feature at your own discretion depending on your use case.
|
|
||||||
|
|
||||||
More details can be found at benchmark's [README.md](./test/benchmark/README.md)
|
More details can be found at benchmark's [README.md](./test/benchmark/README.md)
|
@ -21,12 +21,10 @@ func InitAdministration() *fiber.App {
|
|||||||
TrustedProxies: viper.GetStringSlice("security.administration_trusted_proxies"),
|
TrustedProxies: viper.GetStringSlice("security.administration_trusted_proxies"),
|
||||||
})
|
})
|
||||||
|
|
||||||
if viper.GetBool("performance.request_logging") {
|
app.Use(logger.New(logger.Config{
|
||||||
app.Use(logger.New(logger.Config{
|
Output: log.Logger,
|
||||||
Output: log.Logger,
|
Format: "[Administration] [${time}] ${status} - ${latency} ${method} ${path}\n",
|
||||||
Format: "[Administration] [${time}] ${status} - ${latency} ${method} ${path}\n",
|
}))
|
||||||
}))
|
|
||||||
}
|
|
||||||
|
|
||||||
app.Use(basicauth.New(basicauth.Config{
|
app.Use(basicauth.New(basicauth.Config{
|
||||||
Realm: fmt.Sprintf("RoadSign v%s", roadsign.AppVersion),
|
Realm: fmt.Sprintf("RoadSign v%s", roadsign.AppVersion),
|
||||||
|
@ -22,12 +22,10 @@ func InitServer() *fiber.App {
|
|||||||
BodyLimit: viper.GetInt("hypertext.limitation.max_body_size"),
|
BodyLimit: viper.GetInt("hypertext.limitation.max_body_size"),
|
||||||
})
|
})
|
||||||
|
|
||||||
if viper.GetBool("performance.request_logging") {
|
app.Use(logger.New(logger.Config{
|
||||||
app.Use(logger.New(logger.Config{
|
Output: log.Logger,
|
||||||
Output: log.Logger,
|
Format: "[Proxies] [${time}] ${status} - ${latency} ${method} ${path}\n",
|
||||||
Format: "[Proxies] [${time}] ${status} - ${latency} ${method} ${path}\n",
|
}))
|
||||||
}))
|
|
||||||
}
|
|
||||||
|
|
||||||
if viper.GetInt("hypertext.limitation.max_qps") > 0 {
|
if viper.GetInt("hypertext.limitation.max_qps") > 0 {
|
||||||
app.Use(limiter.New(limiter.Config{
|
app.Use(limiter.New(limiter.Config{
|
||||||
|
@ -13,12 +13,11 @@ hypertext:
|
|||||||
max_body_size: -1
|
max_body_size: -1
|
||||||
max_qps: -1
|
max_qps: -1
|
||||||
ports:
|
ports:
|
||||||
- :8000
|
- :80
|
||||||
secured_ports: []
|
secured_ports: []
|
||||||
paths:
|
paths:
|
||||||
configs: ./config
|
configs: ./config
|
||||||
performance:
|
performance:
|
||||||
request_logging: true
|
|
||||||
network_timeout: 3000
|
network_timeout: 3000
|
||||||
prefork: false
|
prefork: false
|
||||||
security:
|
security:
|
||||||
|
@ -8,31 +8,25 @@ Welcome to contribute more tests of others reverse proxy software!
|
|||||||
All tests are running on my workstation:
|
All tests are running on my workstation:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
..' littlesheep@LittleSheepdeMacBook-Pro
|
.., LittleSheep@PEROPERO-WORKSTATION
|
||||||
,xNMM. ------------------------------------
|
....,,:;+ccllll --------------------------------
|
||||||
.OMMMMo OS: macOS Sonoma 14.1 23B2073 arm64
|
...,,+:; cllllllllllllllllll OS: Windows 10 Pro x86_64
|
||||||
lMM" Host: MacBook Pro (14-inch, Nov 2023, Three Thunderbolt 4 ports)
|
,cclllllllllll lllllllllllllllllll Host: LENOVO 82TF
|
||||||
.;loddo:. .olloddol;. Kernel: 23.1.0
|
llllllllllllll lllllllllllllllllll Kernel: 10.0.19045
|
||||||
cKMMMMMMMMMMNWMMMMMMMMMM0: Uptime: 2 days, 1 hour, 16 mins
|
llllllllllllll lllllllllllllllllll Uptime: 1 hour, 22 mins
|
||||||
.KMMMMMMMMMMMMMMMMMMMMMMMWd. Packages: 63 (brew), 4 (brew-cask)
|
llllllllllllll lllllllllllllllllll Shell: pwsh 7.4.0
|
||||||
XMMMMMMMMMMMMMMMMMMMMMMMX. Shell: zsh 5.9
|
llllllllllllll lllllllllllllllllll Resolution: 2560x1600
|
||||||
;MMMMMMMMMMMMMMMMMMMMMMMM: Display (Color LCD): 3024x1964 @ 120Hz (as 1512x982) [Built-in]
|
llllllllllllll lllllllllllllllllll DE: Aero
|
||||||
:MMMMMMMMMMMMMMMMMMMMMMMM: DE: Aqua
|
WM: Explorer
|
||||||
.MMMMMMMMMMMMMMMMMMMMMMMMX. WM: Quartz Compositor
|
llllllllllllll lllllllllllllllllll WM Theme: Custom
|
||||||
kMMMMMMMMMMMMMMMMMMMMMMMMWd. WM Theme: Multicolor (Dark)
|
llllllllllllll lllllllllllllllllll Terminal: Windows Terminal
|
||||||
'XMMMMMMMMMMMMMMMMMMMMMMMMMMk Font: .AppleSystemUIFont [System], Helvetica [User]
|
llllllllllllll lllllllllllllllllll CPU: 12th Gen Intel i7-12700H (20) @ 2.690GHz
|
||||||
'XMMMMMMMMMMMMMMMMMMMMMMMMK. Cursor: Fill - Black, Outline - White (32px)
|
llllllllllllll lllllllllllllllllll GPU: Caption
|
||||||
kMMMMMMMMMMMMMMMMMMMMMMd Terminal: iTerm 3.4.22
|
llllllllllllll lllllllllllllllllll GPU: NVIDIA GeForce RTX 3070 Laptop GPU
|
||||||
;KMMMMMMMWXXWMMMMMMMk. Terminal Font: MesloLGMNFM-Regular (12pt)
|
`'ccllllllllll lllllllllllllllllll GPU
|
||||||
"cooc*" "*coo'" CPU: Apple M3 Max (14) @ 4.06 GHz
|
`' \*:: :ccllllllllllllllll Memory: 7318MiB / 16192MiB
|
||||||
GPU: Apple M3 Max (30) [Integrated]
|
````''*::cll
|
||||||
Memory: 18.45 GiB / 36.00 GiB (51%)
|
``
|
||||||
Swap: Disabled
|
|
||||||
Disk (/): 72.52 GiB / 926.35 GiB (8%) - apfs [Read-only]
|
|
||||||
Local IP (en0): 192.168.50.0/24 *
|
|
||||||
Battery: 100% [AC connected]
|
|
||||||
Power Adapter: 96W USB-C Power Adapter
|
|
||||||
Locale: zh_CN.UTF-8
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Results
|
## Results
|
||||||
@ -60,13 +54,13 @@ go-wrk -c 60 -d 120 http://localhost:8001
|
|||||||
go-wrk -c 60 -d 120 http://localhost:8000
|
go-wrk -c 60 -d 120 http://localhost:8000
|
||||||
# => Running 120s test @ http://localhost:8000
|
# => Running 120s test @ http://localhost:8000
|
||||||
# => 60 goroutine(s) running concurrently
|
# => 60 goroutine(s) running concurrently
|
||||||
# => 8905230 requests in 1m56.215762709s, 3.52GB read
|
# => 3256820 requests in 1m59.446620043s, 1.43GB read
|
||||||
# => Requests/sec: 76626.70
|
# => Requests/sec: 27265.90
|
||||||
# => Transfer/sec: 30.98MB
|
# => Transfer/sec: 12.27MB
|
||||||
# => Avg Req Time: 783.016µs
|
# => Avg Req Time: 2.20055ms
|
||||||
# => Fastest Request: 28.542µs
|
# => Fastest Request: 0s
|
||||||
# => Slowest Request: 46.773083ms
|
# => Slowest Request: 56.8726ms
|
||||||
# => Number of Errors: 0
|
# => Number of Errors: 0
|
||||||
```
|
```
|
||||||
|
|
||||||
### RoadSign w/ Prefork
|
### RoadSign w/ Prefork
|
||||||
@ -74,12 +68,12 @@ go-wrk -c 60 -d 120 http://localhost:8000
|
|||||||
```shell
|
```shell
|
||||||
go-wrk -c 60 -d 120 http://localhost:8000
|
go-wrk -c 60 -d 120 http://localhost:8000
|
||||||
# => Running 120s test @ http://localhost:8000
|
# => Running 120s test @ http://localhost:8000
|
||||||
# => 60 goroutine(s) running concurrently
|
# => 60 goroutine(s) running concurrently
|
||||||
# => 4784308 requests in 1m59.100307178s, 1.89GB read
|
# => 2188594 requests in 1m59.933175915s, 985.16MB read
|
||||||
# => Requests/sec: 40170.41
|
# => Requests/sec: 18248.45
|
||||||
# => Transfer/sec: 16.24MB
|
# => Transfer/sec: 8.21MB
|
||||||
# => Avg Req Time: 1.493636ms
|
# => Avg Req Time: 3.287951ms
|
||||||
# => Fastest Request: 34.291µs
|
# => Fastest Request: 0s
|
||||||
# => Slowest Request: 8.727666ms
|
# => Slowest Request: 121.5189ms
|
||||||
# => Number of Errors: 0
|
# => Number of Errors: 0
|
||||||
```
|
```
|
@ -17,7 +17,6 @@ hypertext:
|
|||||||
paths:
|
paths:
|
||||||
configs: ./config
|
configs: ./config
|
||||||
performance:
|
performance:
|
||||||
request_logging: false
|
|
||||||
network_timeout: 3000
|
network_timeout: 3000
|
||||||
prefork: true
|
prefork: true
|
||||||
security:
|
security:
|
||||||
|
@ -17,7 +17,6 @@ hypertext:
|
|||||||
paths:
|
paths:
|
||||||
configs: ./config
|
configs: ./config
|
||||||
performance:
|
performance:
|
||||||
request_logging: false
|
|
||||||
network_timeout: 3000
|
network_timeout: 3000
|
||||||
prefork: false
|
prefork: false
|
||||||
security:
|
security:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user