-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Have the presto jdbc driver handle set-cookie responses that may come from load balancers. #9343
Comments
Actually this approach is wrong. In order for this to work the driver will need to look for Set-cookie responses and resent those cookies in the follow up requests after the initial. This way you can use the ELB generated session cookies vs. having Presto define it. I've gotten it to work by reimplementing the StatementClient in the JDBC driver to look for the Set-Cookie response for the AWS ELB. Then resending it works. I would suggest to allow the presto JDBC driver to handle set-cookie responses as an option and custom configure which cookie value they to resend. |
No I haven't but looks like that should work if it supports cookies. I guess I'll wait until it gets merged into master and then AWS upgrades their version of Presto. |
#9684 is merged, closing this. |
We've been wanting to run more than 1 presto cluster behind an ELB and have our applications use the Presto JDBC driver to issues queries against. Unfortunately it doesn't work since a single request is composed of multiple http requests and those requests will be distributed to each cluster.
What would be nice is if we can take advantage of AWS ELB's stick session policy. This would require the Cookie header to be set. But with the JDBC driver you can't set it. If I could set any type of custom or fixed cookie header in my request, then my application could generate unique id for that request before sending out the request.
The text was updated successfully, but these errors were encountered: