NodeBalancer serving HTTPS content via Apache Named Virtual Hosts

I am trying to test the Linode Node Balancer for something. I currently have 2 linodes running Aapche using Named Virtual Hosts to host multiple domains/subdomains. One domain and all subdomains of this domain are served over HTTPS with a certificate installed in Apache. Currently I am doing load balancing via Cloudflare load balancer but I seem to be having issues so wanted to do a test.

I've therefore set up a node balancer and configured it to connect to both linodes and set up my local hosts file to point to the IP of the load balancer so I've not affecting live traffic which can still get served via cloudflare.

I originally set up the node balancer to use HTTPS and port 443 on the backend adding the certificate, intermediary certificate and private key but found that the virtual host never matched the subdomain I was testing and picked the first/default virutal host.

Speaking with Linode support they suggested that it would have to be TCP based node balancer, which does work, but this then means I can't use HTTP Sessions Cookie for stickiness and instead of I have to use table based, which looks like the session will automatically expire after 30 minutes kicking any users out of my web service when they might have been still been using - I know I can work around this but want to avoid this as shouldn't really need to.

So basically my question is, is it possible to use the node balancer to serve HTTPS content, using Apache Named Virtual Hosts and Cookie based session stickiness.

1 Reply

Hi there,

I can definitely understand why that would be useful functionality for the Nodebalancer. I will pass along your feedback and maybe it is something we can integrate in the future.

That being said, I think that what you're describing is absolutely doable on a HAProxy you configure yourself. It might become a bit of a DIY project to get it up and running. If you haven't already I would suggest taking a look at our guide to using HAProxy for Load Balancing. I would also recommend this article on HAProxy.org which offers some really excellent information about sessions persistence with HAProxy. It also has specific instructions for using HTTP Cookies. Finally, this post has the necessary settings block to redirect to multiple SSL terminating domains.

I believe these are all the pieces to getting your load balancer up and running just so. I'm very interested to see how they all go together!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct