DEV Community

Cover image for Lightweight Go-based Spa-to-http "beats" Nginx in SPA serving performance
Ivan Borshchov
Ivan Borshchov

Posted on

7 5

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.358s (10.3% faster) ❌1.514s
Requests-per-second on 0.5 KiB HTML file at localhost * ✅80497 (1.6% faster) ❌79214
Transfer speed on 0.5 KiB HTML file * ❌74.16 MiB/sec ✅75.09 MiB/sec (1.7% faster)
Requests-per-second on 5 KiB JS file at localhost * ✅66126 (5% faster) ❌62831
Transfer speed on 5 KiB HTML file * ✅301.32 MiB/sec (4.3% faster) ❌288.4

Other benefits:

Spa-to-http 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

Spa-to-http on GitHub

Image of AssemblyAI tool

Challenge Submission: SpeechCraft - AI-Powered Speech Analysis for Better Communication

SpeechCraft is an advanced real-time speech analytics platform that transforms spoken words into actionable insights. Using cutting-edge AI technology from AssemblyAI, it provides instant transcription while analyzing multiple dimensions of speech performance.

Read full post

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay