An Interest In:
Web News this Week
- April 25, 2024
- April 24, 2024
- April 23, 2024
- April 22, 2024
- April 21, 2024
- April 20, 2024
- April 19, 2024
September 16, 2022 11:59 am GMT
Original Link: https://dev.to/ivictbor/lightweight-go-based-spa-to-http-beats-nginx-in-spa-serving-performance-459c
Lightweight Go-based Spa-to-http "beats" Nginx in SPA serving performance
Performance benchmark, how it was measured
Spa-to-http | Nginx | |
---|---|---|
Average time from container start to HTTP port availability (100 startups) | 1.358 (10.3% faster) | 1.514 (10.3% slower) |
Requests-per-second on 0.5 KiB HTML file at localhost * | 80497 (1.6% faster) | 79214 (1.6% slower) |
Transfer speed on 0.5 KiB HTML file * | 74.16 MiB/sec (1.7% slower) | 75.09 MiB/sec (1.7% faster) |
Requests-per-second on 5 KiB JS file at localhost * | 66126 (5% faster) | 62831 (5% slower) |
Transfer speed on 5 KiB HTML file * | 301.32 MiB/sec (4.3% faster) | 288.4 (4.3% slower) |
Other benefits:
Spa-to-http | Nginx | Nginx |
---|---|---|
Zero-configuration | No config files, SPA serving works out of the box with most optimal settings | Need to create a dedicated config file |
Ability to config settings like host, port, compression using Environment variables or CLI | Yes | No, only text config file |
Docker image size | 13.2 MiB (v1.0.3) | 142 MiB (v1.23.1) |
Brotli compression out-of-the-box | Yes, just set env BROTLI=true | You need a dedicated module like ngx_brotli |
Original Link: https://dev.to/ivictbor/lightweight-go-based-spa-to-http-beats-nginx-in-spa-serving-performance-459c
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To