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

Proxy protocol support #2240

Closed
shamil opened this issue Mar 22, 2017 · 10 comments
Closed

Proxy protocol support #2240

shamil opened this issue Mar 22, 2017 · 10 comments
Assignees
Labels
task/feature Requests for new features in Kong
Milestone

Comments

@shamil
Copy link

shamil commented Mar 22, 2017

Hi, this is not a bug, but a feature request.
Instead of manually providing nginx.conf file. Is it possible to add native proxy protocol support in Kong?

@bungle
Copy link
Member

bungle commented Mar 23, 2017

@shamil, do you mean to provide a configuration variable for that?

@shamil
Copy link
Author

shamil commented Mar 23, 2017

@bungle, yes. A configuration option

@bungle
Copy link
Member

bungle commented Mar 23, 2017

@shamil, the small problem I see here is that proxy protocol is exclusive (correct me if I'm wrong), and if you still want to support non-proxy protocol that practically means two different server blocks (?). What do you think?

@shamil
Copy link
Author

shamil commented Mar 23, 2017

@bungle yes, it's exclusive.

Having another port just for proxy_protocol is good idea, but IMHO it's nice to have, not must. But at least kong should have a possibility to let users enable proxy_protocol for all APIs

In my opinion in most cases when you want proxy_protocol, in those cases kong proxy usually sits behind load-balancer like ELB or Haproxy, so you will want it for all APIs.

@shamil
Copy link
Author

shamil commented Mar 26, 2017

@bungle what you think? Is it reasonable?

Also real_ip_header should be set to proxy_protocol, so the real IP can be retrieved properly, which I think is already beeing addresed here: #2236

@bungle
Copy link
Member

bungle commented Mar 26, 2017

@shamil I think it is reasonable and it is easy to implement. Yes, I was thinking the same that if real_ip_header is set to proxy_protocol we could just generate the associated listen directives, and that's it.

bungle added a commit that referenced this issue Mar 27, 2017
bungle added a commit that referenced this issue Mar 28, 2017
@bungle
Copy link
Member

bungle commented Apr 3, 2017

@shamil, if you have time to test #2236 for Proxy protocol functionality and give us feedback, that would be greatly appreciated!

@shamil
Copy link
Author

shamil commented Apr 3, 2017

@bungle thanks, as soon as I get back from vacation (Thursday) I will run tests and report

@shamil
Copy link
Author

shamil commented Apr 6, 2017

@bungle tested, works as expected. Setting real_ip_header to proxy_protocol will update the listen directive accordingly.

And my Load-balancer was able to successfully communicate with kong using proxy_protocol

Thanks a lot...

@bungle bungle added this to the 0.10.2 milestone Apr 6, 2017
@bungle bungle added the task/feature Requests for new features in Kong label Apr 6, 2017
@bungle bungle self-assigned this Apr 6, 2017
thibaultcha pushed a commit that referenced this issue Apr 15, 2017
When `real_ip_header = proxy_protocol`, we enable the PROXY protocol
support on the Nginx side, by appending the `proxy_procotol` option to
the `listen` directive of the proxy server.

Implement #2240
@thibaultcha
Copy link
Member

#2236 is merged, closing this now, thanks @bungle! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task/feature Requests for new features in Kong
Projects
None yet
Development

No branches or pull requests

3 participants