Live data from Hacker News

Redbird: A modern reverse proxy for Node

github.com

51–60 of 77 posts

Re: Redbird: A modern reverse proxy for Node

#51

Earlier quoted context omitted.

There are cases when performance is not your main focus but simplicity of use is. Like during development. I'd of course never use this in production, but it's perfect for my development needs.

I agree with the sentiment, but using nginx as a proxy is reasonably easy (at least after you make one that works and can reuse that configuration.) The advantage of developing on as similar a platform to the projected production platform is that when you do deploy to a real environment, there are fewer nasty surprises.

It is not reasonably easy, I can't set it up completely with "git clone" and it does not stay inside the project (that's an issue when your developers use a huge variety of operating systems with varying installed and configured software). That means a lot of time lost during problem solving with the hundreds of developers I work with, most of them have never even heard about nginx, they're developers, not sysadmins.

There absolutely should not be any nasty surprises with switching a reverse proxy, and you can cover that with end to end tests. Such issue would be a bug in the reverse proxy.

Of course there are things like Docker, but that implies performance issues on Mac.

Re: Redbird: A modern reverse proxy for Node

#52
post #48

Earlier quoted context omitted.

> If you just want reverse-proxying, you can choose between the simplicity of Caddy or the power of Nginx (or Apache). Why would I want to run a JS app (that I know will be less performant) to do that? The same reason you'd use Caddy over Nginx or Apache, why use the former over the the latter when the latter already exist and are faster? Because someone who knows Go but not C can customize its codebase, just like so…

I have used apache since version 1.0 came out. I have never needed to modify the code. If you use this logic, you would not be able to run Linux because it is written in C, correct?

No, not correct. Why do you think it's okay to immediately jump to an absurd conclusion?

There's value in being able to modify the software you're using. That doesn't mean you throw out absolutely everything every single time you want to appreciate that value.

Re: Redbird: A modern reverse proxy for Node

#53

Earlier quoted context omitted.

Node was designed to build networking applications just like this.

No, node was the realization that JS’s concurrency model could be applied to applications like this.

No? You're not even disagreeing with the parent.

Re: Redbird: A modern reverse proxy for Node

#54
I mostly agree with the sentiment in other comments of just using nginx, but there is one standout feature here that looks incredibly useful:

> We have now support for automatic generation of SSL certificates using LetsEncrypt. Zero config setup for your TLS protected services that just works.

I've scripted this kind of letsencrypt certs automation before with certbot and nginx, which is fine but a 'just works' declarative plugin for nginx would be much nicer.

Does anything like this exist? Anyone have experience with using it? Asking here as googling brings up a bunch of outdated forum threads etc to wade through.

Re: Redbird: A modern reverse proxy for Node

#55

Earlier quoted context omitted.

There are cases when performance is not your main focus but simplicity of use is. Like during development. I'd of course never use this in production, but it's perfect for my development needs.

I agree with the sentiment, but using nginx as a proxy is reasonably easy (at least after you make one that works and can reuse that configuration.) The advantage of developing on as similar a platform to the projected production platform is that when you do deploy to a real environment, there are fewer nasty surprises.

How easy is it to use nginx for dynamic proxying? Wondering, because the need I have is to be able to dynamically route requests to ephemeral flask apps that could be on a different host/port at any given moment. Not my design BTW, but it's what I need to do.

The thought was to have node manage the flask processes and another tracker service which would dynamically proxy to the apps. Can nginx provide this? Forgive my ignorance, just new to the concept of dynamic proxying.

Re: Redbird: A modern reverse proxy for Node

#56
post #50

Earlier quoted context omitted.

Python: we use the node event loop too now ( https://magic.io/blog/uvloop-blazing-fast-python-networking/ ). But actually, you could have setup a pure Python server instead of nginx for the last 10 years with twisted. Not that you should not consider uring nginx anyway: it deals with caching, load balancing, has great tutorials, it's battle tested, and has tons of pluging. But performance wise, WSGI is not Python.

Sure, I mentioned Tornado a few minutes before you posted this. Twisted obviously counts too, I dislike the non-PEP8 coding style it uses but that's off topic. I love Python's non blocking features, they're just not in the mainline VM right now. Here's hoping for a libuv or whatever else non blocking Python 4 VM / stdlib.

Asyncio has been in the the mainline VM for quite some time.

Re: Redbird: A modern reverse proxy for Node

#57

I mostly agree with the sentiment in other comments of just using nginx, but there is one standout feature here that looks incredibly useful: > We have now support for automatic generation of SSL certificates using LetsEncrypt. Zero config setup for your TLS protected services that just works. I've scripted this kind of letsencrypt certs automation before with certbot and nginx, which is fine but a 'just works' decla…

It's not nginx but Caddy had stupid easy SSL automation through LetsEncrypt.

Re: Redbird: A modern reverse proxy for Node

#58

Earlier quoted context omitted.

I have used apache since version 1.0 came out. I have never needed to modify the code. If you use this logic, you would not be able to run Linux because it is written in C, correct?

No, not correct. Why do you think it's okay to immediately jump to an absurd conclusion? There's value in being able to modify the software you're using. That doesn't mean you throw out absolutely everything every single time you want to appreciate that value.

[deleted]

Re: Redbird: A modern reverse proxy for Node

#59
Quite nice. node-http-proxy is awesome, lacks a few features (but has a few more such as websockets). Redbird has http2 as well.

But to be frank, we have used node-http-proxy and other stuff before. It doesn't end with development. People put this to reverse proxy API calls in production, and then the other stuff that this calls into - it also uses proxying to call more stuff. In general, if you find yourself using this as a "convenient, declarative way to route" in production, you _might potentially_ be digging yourself a hole. The lines between "harmless reverse proxying" and "service routing and discovery" can become thin.

Post reply on HN