Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bind http by default in development env #59

Closed
ryudoawaru opened this issue Apr 21, 2019 · 4 comments
Closed

Bind http by default in development env #59

ryudoawaru opened this issue Apr 21, 2019 · 4 comments

Comments

@ryudoawaru
Copy link

ryudoawaru commented Apr 21, 2019

So far Falcon binds https default, you have to bind http://localhost:$PORT explicitly otherwise you will get TLS error.

I think it would make trouble for newbies who want to try or using Falcon on development so I recommend we should bind http by default at least in development environment.

@ryudoawaru ryudoawaru changed the title Bind http default in development env Bind http by default in development env Apr 21, 2019
@ioquatix
Copy link
Member

I agree but I want to support HTTP/2 by default. Let me think about it. Maybe you are right.

@ryudoawaru
Copy link
Author

The ordinary production use-case is to have a frontend proxy such as Nginx or ELB and communicates between Rails through HTTP protocol for cost saving since both sides are in an intranet so it might not necessary to listen on HTTP/2 with HTTPS by default.

@ioquatix
Copy link
Member

ioquatix commented Apr 23, 2019

So, I thought about this a bit more.

(1) Basically falcon serve is for development purposes, and IMHO, should be HTTP/2 + TLS by default. Because it's trying to implement the latest specifications. Falcon actually supports both HTTP/1 and HTTP/2 depending on ALPN. So it supports WebSockets too, via HTTP/1 in this mode.

The critical point is how do we support production and what are the expectations?

As you say, there are two main use cases.

(2) When Falcon is used as an application server behind an existing HTTP server, the general expectation would be HTTP/1 with no TLS.

(3) When Falcon is used as a front end server, the general expectation would be to TLS + ALPN to support both HTTP/1 and HTTP/2.

The current release of falcon doesn't officially support the model required for (2) and (3) yet. There are some prototype code to do it, but the problem is the process model so support for "reload" isn't quite there yet. So, it's a work in progress. Of course, you can still use Nginx to proxy to falcon running with (1) but that's not a good long term solution.

@ioquatix
Copy link
Member

I think binding to https by default is what we want to do with falcon, so we can support HTTP/2 out of the box.

If you use falcon virtual, it binds to both http and https and redirects to https. My plan is to support HSTS by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants