logoalt Hacker News

macleginn • today at 7:05 PM • 2 replies • view on HN

"A modern web application typically puts a web server like nginx in front and reverse-proxies to an application server written in another language like Ruby, Python, Go, or Rust. That always felt a bit strange to me: you essentially have two web servers, and one of them is also responsible for your business logic." -- Is the fundamental difference here that the business-logic binary is not always running but gets spun out with each request? This looks like a relatively minor thing, to be honest.


Replies

prophittcorey • today at 8:49 PM

I meant to express the layers of abstraction feel strange to me in a typical setup.

A typical setup today looks like:

nginx -> puma/unicorn/gunicorn/etc -> your code

With cgi that middle layer is gone. It's just:

nginx -> your code

The layer reduction is nice when it comes to things like debugging. You don't have to guess if the middle server is removing a header, failing to forward a header, etc.

It's obvious who does that with cgi.

➕ show 1 reply