Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
September 16, 2022 11:59 am GMT

Lightweight Go-based Spa-to-http "beats" Nginx in SPA serving performance

Performance benchmark, how it was measured

Spa-to-httpNginx
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-httpNginxNginx
Zero-configurationNo config files, SPA serving works out of the box with most optimal settingsNeed to create a dedicated config file
Ability to config settings like host, port, compression using Environment variables or CLIYesNo, only text config file
Docker image size13.2 MiB (v1.0.3)142 MiB (v1.23.1)
Brotli compression out-of-the-boxYes, just set env BROTLI=trueYou need a dedicated module like ngx_brotli

Spa-to-http on GitHub


Original Link: https://dev.to/ivictbor/lightweight-go-based-spa-to-http-beats-nginx-in-spa-serving-performance-459c

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To