How to re-encrypt Load Balancer-to-server traffic?

April 24, 2018 1k views
Load Balancing Security Let's Encrypt VPN DigitalOcean Networking Ubuntu 16.04

Hi all,

I'm about to set up a Load Balancer with 2 droplets (with more droplets likely added in the future). I understand that with DigialOcean Load Balancers I can SSL/TLS encrypt the user-to-loadbalancer traffic, but then the traffic will pass unencrypted from the load balancer to the 2 backend server droplets.

I know that SSL Passthrough (i.e. end-to-end encryption) on DigitalOcean LoadBalancer is possible, but am concerned about DDoS attacks and would like to perform layer 7 functions on the data ... therefore passthrough doesn't seem suitable. I'm therefore looking into "re-encrypting" the loadbalancer-to-server traffic.

1) Do DigitalOcean load balancers allow for re-encryption?
2) How can I set up such re-encryption? (preferably on DigitalOcean LoadBalancers, or otherwise if this isn't possible)
3) Is re-encryption even value-add if I have set up an OpenVPN around my back-end server droplets (I haven't figured out how to include Load Balancer in the VPN)?

Apologies, networking is still fairly new to me!

Thanks,
Emma

1 Answer

If security is required from end to end, your best option is to use SSL Passthrough. Your droplets will suffer the performance overhead of SSL encryption regardless of Passthrough or Re-encryption at the Load Balancer.

If security is not crucial, then off-loading the encryption workload to the Load Balancers is your best option for performance.

  • Thanks Allan.

    I did think about the performance hit, but according to some of the comments at StackOverflow re-encryption doesn’t add as much load as you might think, due to the load balancer usually being able to maintain persistent connectsion back to the servers. See Ralph Bolton’s comment here: https://security.stackexchange.com/questions/30403/should-ssl-be-terminated-at-a-load-balancer

    • In my experience, Load Balancers do not provide the ability to multiplex connections.

      What Ralph Bolton is describing seems more akin to a reverse proxy, which can serve multiple endpoints while utilizing a single connection to the source server because it combines the requests as though they were all generated by the proxy itself.

Have another answer? Share your knowledge.