Hacker News new | past | comments | ask | show | jobs | submit login

Still without ssl. Nice to see lots of stars and forks.



SSL is really not the responsibility of the web framework.


There are deployments where the traffic from the LB => app instances needs to be encrypted, so it would be the requirement of the server.

Source; I build secure financial services software day to day.


Are reverse proxies always the way to go?


i always just use nginx and don't see any downsides.


In the age of "microservices" it seems to be the direction. Also, in any HA deployment, would generally be the case anyway.


No. Usually web application would be exposed through FastCGI or similar protocol.

Insisting that either your tiny web application that can do next to nothing is the thing that owns 80/tcp (and/or 443/tcp) or runs behind a HTTP proxy is stupid. Proxying HTTP requests properly is harder than it sounds, which is surprising every now and then and thus is easy to screw up (what happens to Host: header? who is the TCP client? is it HTTP or HTTPs?), and your tiny web application, as I've called it, is not the only thing I want to host on the machine.


Practically every company I've worked with uses an HTTP reverse proxy. When you use something like nginx, it's really not hard at all to get right. Support for HTTP is more widespread than support for FastCGI these days, especially with more obscure tech stacks.

Edit: You can run multiple apps on separate ports, so that shouldn't be an issue.


> Practically every company I've worked with uses an HTTP reverse proxy.

Well, there are people who can say the same about Node.js or RoR. Not that it makes a majority.

> When you use something like nginx, it's really not hard at all to get right.

It's not a matter of nginx. It's a matter of what assumptions are hardcoded in the application.

> Edit: You can run multiple apps on separate ports, so that shouldn't be an issue.

Of course it is an issue. Such a deployment looks terrible at best.


> It's not a matter of nginx. It's a matter of what assumptions are hardcoded in the application.

You haven't actually given any good examples for what makes HTTP reverse proxying bad. Things like dealing with the Host header are two-minute fixes that you only have to deal with once, but they really shouldn't even be issues in the first place. HTTP is well supported, well understood, easy to implement, and easy to scale. On the flip side, you might waste a lot of time trying to get your tech stack working with FastCGI if there isn't already existing support, and you don't benefit from any HTTP support you already have.

> Such a deployment looks terrible at best.

Again, "looks terrible" is not a valid argument against it.


> You haven't actually given any good examples for what makes HTTP reverse proxying bad.

Try running anything that generates absolute URLs in its HTML. And then try to make it running under two different domains, for example. A clear cookie/URL disaster, and it's all for web protocols from 2002, without talking about HSTS or CORS yet.

> Things like dealing with the Host header are two-minute fixes that you only have to deal with once,

For every f&ckin' application.

> but they really shouldn't even be issues in the first place.

They shouldn't be, I agree, in that sense that it should be impossible to get it wrong. With HTTP you don't have this and you need to deploy workarounds.

> On the flip side, you might waste a lot of time trying to get your tech stack working with FastCGI if there isn't already existing support,

Node.js may be the only offender here (I didn't bother to check). Virtually everything else that is used for web applications supports FastCGI.

> and you don't benefit from any HTTP support you already have.

Like what? What exactly is the benefit of running HTTP between frontend HTTP server and application's backend? Because the trouble with passing information about the request is a clear downside.

>> Such a deployment looks terrible at best.

> Again, "looks terrible" is not a valid argument against it.

Oh, quite the contrary. Inelegant systems or deployments usually give a death by a thousand cuts. Too many exceptions and rules and guesses to work with them.

Just as we can judge the elegance of source code, we can judge the elegance of deployments.


> What exactly is the benefit of running HTTP between frontend HTTP server and application's backend?

For some applications (those that fit within the constraints of REST - and, no, that's not all Web "apps") - you can sometimes get easy caching by dropping something like varnish somewhere between the user and the app.


Interesting.

I only met FastCGI in PHP. All NodeJS apps I saw used HTTP.

Is there any benefit of doing it that way?

How does it work with WebSockets?


> I only met FastCGI in PHP. All NodeJS apps I saw used HTTP.

And I met FastCGI in Python, Perl, Ruby, and Erlang (though I haven't used the last one yet). Oh, and uWSGI can expose anything it runs through FastCGI.

My personal opinion is that web crowd (most of JavaScript programmers fall in here) just doesn't want to learn from anybody else.

> Is there any benefit of doing it that way?

Compared to running the tiny web application on 80/tcp? Sure: I can run more than one and I don't need root privileges for the application.

Compared to running the application behind a reverse proxy? Ditto: it's virtually impossible to get the setup wrong, so it's easier in the long run.

> How does it work with WebSockets?

No idea. I don't develop web applications.


> My personal opinion is that web crowd (most of JavaScript programmers fall in here) just doesn't want to learn from anybody else.

Where would you put Java programmers? I haven't seen FastCGI there.

> No idea. I don't develop web applications. So why do you talk about FastCGI? It is strictly for web stuff.


I just read that WebSockets aren't supported by FastCGI, so I guess this is the reason for all the reverse proxying in Node-land, hehe


It includes a web server.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: