RejectedSoftware Forums

Sign up

Reverse Proxy

Do you really need to put vibenews behind a reverse proxy? What are the benefits? Is it only that is is better (e.g., better performance) or is it really recommended (e.g., vibe.d craps out with some problematic HTTP requests)?

For now I'm using only listenHTTPReverseProxy() from another vibe.d process, so if the recommendation is due to limitations of vibe.d then I guess that doesn't help a single bit. To put vibenews directly listening on the public IP address I would have to change (fork) the code, since it seems that bit isn't configurable, which is a bit of maintenance hassle. Would you accept a pull request that allowed setting the hostName from the default "127.0.0.1" to something else?

Re: Reverse Proxy

Am 20.02.2015 um 15:47 schrieb Luís Marques:

Do you really need to put vibenews behind a reverse proxy? What are the benefits? Is it only that is is better (e.g., better performance) or is it really recommended (e.g., vibe.d craps out with some problematic HTTP requests)?

For now I'm using only listenHTTPReverseProxy() from another vibe.d process, so if the recommendation is due to limitations of vibe.d then I guess that doesn't help a single bit. To put vibenews directly listening on the public IP address I would have to change (fork) the code, since it seems that bit isn't configurable, which is a bit of maintenance hassle. Would you accept a pull request that allowed setting the hostName from the default "127.0.0.1" to something else?

Yes that would be no problem. This just has historical reasons (in the
sense that I'm personally just always had it running behind a proxy). Of
course a reverse proxy can also be useful to have for DoS protection
(where vibe.d doesn't have many countermeasures, yet), but everyone
should be able to decide how important that is.

Re: Reverse Proxy

On Fri, 20 Feb 2015 20:29:47 +0100, Sönke Ludwig wrote:

Yes that would be no problem.

I'm thinking of changing it so that if no bind address is specified in the configuration file then vibenews would just use the default HTTPServerSettings.bindAddresses list, which would expose it to the Internet. To make sure that existing users are not surprised by the new behavior, I will include a settings.json in the repo, which will change the bind address back to the current value of 127.0.0.1, and provide a convenient example of such configuration file. Does that sound OK?

This just has historical reasons (in the
sense that I'm personally just always had it running behind a proxy). Of
course a reverse proxy can also be useful to have for DoS protection
(where vibe.d doesn't have many countermeasures, yet), but everyone
should be able to decide how important that is.

OK, so the list so far of the advantages of using a reverse proxy is:

  • Better DoS control, due to vibe.d currently being weak in that area;

Is there anything else? I've quickly looked into the possibility of using nginx to allow no-downtime upgrades, but it wasn't clear to me how well the load balancing feature would work for that.

Re: Reverse Proxy

On Sat, 21 Feb 2015 00:34:20 GMT, Luís Marques wrote:

On Fri, 20 Feb 2015 20:29:47 +0100, Sönke Ludwig wrote:

Yes that would be no problem.

I'm thinking of changing it so that if no bind address is specified in the configuration file then vibenews would just use the default HTTPServerSettings.bindAddresses list, which would expose it to the Internet. To make sure that existing users are not surprised by the new behavior, I will include a settings.json in the repo, which will change the bind address back to the current value of 127.0.0.1, and provide a convenient example of such configuration file. Does that sound OK?

Done https://github.com/rejectedsoftware/vibenews/pull/28.