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 Docusign

Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (0)

Retry later
Retry later