-
Notifications
You must be signed in to change notification settings - Fork 59
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
Support subdomain and paths in process labels #123
base: master
Are you sure you want to change the base?
Conversation
Fixes #121 |
This is great. Not sure about messing with process labels. May be invoker.ini can look like
|
This PR doesn't anything fundamental about process labels. We're just making the DnsCheck handle a subset of them more robustly (previously, processes were still allowed to have names with If we don't like having I think [chat]
directory = /Users/bob/chat/
command = chatd -p $PORT
location = www.myapp/chat chat.myapp support.myapp/chat |
Another part to consider is the If so, the easiest way would be to support having subdomains and paths in the process name. The alternative would be to change the |
I added support for location. We can now do what you suggested: [myapp]
directory = /Users/bob/rails/
command = rails s -p $PORT
location = www.myapp
[search]
directory = /Users/bob/search/
command = searchd -p $PORT
location = www.myapp/search
[chat]
directory = /Users/bob/chat/
command = chatd -p $PORT
location = www.myapp/chat |
Thank you for this, I will try to review and merge this one this week. |
This is to avoid issues where subsequent requests from a persistent HTTP connection would be directed to a stale proxy regardless of the location. Only a problem now because we're taking paths into consideration for proxy routing, whereas before, backends could be reused since persistent HTTP connections were guaranteed to end up with the same backend anyway.
Hi, were you able to take a look at this? |
@response_http_parser.reset | ||
http_parser.reset | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is sort of unrelated to this change isn't it? Do you think this should be a good idea in general or the path matching specifically made something worse, thereby highlighting a bug we haven't seen before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually required since the previously, there was a one-to-one mapping between incoming domain and backend. Now, since a single incoming domain could have multiple backends depending on the path, we need to make sure that the backend is not persisted across the same request coming in from the same domain.
@dlee thank you so much for writing this largish patch. It looks mostly good. I am so sorry for not able to review the patch until today. But hopefully, I am still not too late. :-) |
No worries, thanks for taking a look! |
Is this functionality supported with Procfiles too? or is this an INI only feature? |
Currently the way this is shaping up to be, this is looking like a |
#129 I think this PR provides everything I need in terms of the functionality that I need mentioned in this PR for subdomains. @gnufied I would hesitate to break away from Procfile's, but that is just my opinion. I heavily use them ;) If only there was a way to export a procfile to ini -- is there? I do think procfile's are more likely used by those who are switching from something like POW which makes the friction of switching almost 0. |
@gnufied An important distinction with @localredhead I'm not sure what you mean by Procfiles being more likely to be used by pow users. As far as I can tell (I being a former pow user), pow doesn't use Procfiles? |
He means that often people using pow also use procfiles to manage their menagerie of services (we work on the same team), and that can include other web apps performing a service role. |
because Heroku |
@dlee do you think #129 provides enough features to not have this feature? I know one is redirection over subdomain while another is over request path, but I suppose they can serve similar purpose in development environment. Obviously #129 works for Procfiles as well and if intention was to share cookies etc by having same domain, that can be achieved by using subdomains too. |
@gnufied having different apps serve different request paths is pretty important for me, but it doesn't have to be through this PR. It could also be achieved via another way, perhaps through a more general |
Hi @gnufied, it's been three weeks since our last discussion and I didn't want to let this fall through the cracks. What were you were planning on doing for request path support? |
+1 to #129 😄 👍 |
Any chances to get it merged? It would be cool to have support for specifying location in order to use subdomains for different processes. |
+1 for this feature if we wont have to fiddle with nginx locally! |
Support targeting specific subdomain and paths:
The routing first resolves the subdomain (longest matching suffix) and then resolves the path (longest matching prefix). For example: