SSL and TLS termination
TLS (Transport Layer Security, the newer name for SSL) is the encryption behind https:// and the padlock in the browser. With TLS termination, the load balancer decrypts the traffic, so it needs a certificate for your site. With TLS passthrough, the load balancer forwards the encrypted traffic unopened, and your own VMs decrypt it with their own certificate.
What is available today
In the portal, HTTPS is shown but disabled: “Needs a TLS certificate. Coming soon”. In the API, an HTTPS listener takes a certificate_ref (a certificate’s ID), but the public API has no call to create or upload a certificate.
Until termination is available, use passthrough for HTTPS. As the portal puts it: “TCP forwards connections unchanged, including TLS passthrough. Your backend servers handle TLS and provide the certificates.”
How passthrough works
- The client opens
https://shop.example.com. Your domain’sArecord points to the load balancer’s IP address. - The load balancer forwards the TCP connection, unchanged, to a healthy VM on its backend port.
- The VM presents its own certificate and decrypts the traffic. The load balancer never sees the content.
So:
- Every VM needs the certificate and key for the name clients use, such as
shop.example.com. - The load balancer can’t read requests, so it can’t route by path or hostname. Every connection goes to the same targets.
- Use a “Port is open” health check. There is no HTTPS check, and an HTTP check against a TLS-only port fails.
Before you begin
- A domain and access to its DNS settings.
- A certificate and key for that domain on every VM, with your web server serving HTTPS on the backend port, for example
443. - That port open in each VM’s firewall group. See Create firewall rules.
- The VMs running in one location, each with its own public IP address. See Attach VMs.
Serve HTTPS with passthrough in the portal
Add the forwarding rule
Under Forwarding rules, set Incoming to TCP and port 443, and Backend to TCP and the port your VMs serve HTTPS on, for example 443.
Serve HTTPS with passthrough with the API
The call answers 202 with an operation. Wait for it, then read the address from conditions.addresses. See Create a load balancer with the API.
Point your domain at the load balancer
The load balancer has an IP address but no hostname. At your DNS provider, add an A record:
An A record also works on a root domain such as example.com.
Verify
Check that the load balancer passes your VM’s certificate through:
The subject should be your domain’s certificate, the one installed on your VMs. After your DNS record resolves, open https://shop.example.com in a browser and check for the padlock, or run:
Limits
Security tips
- Don’t send passwords or personal data through an HTTP listener. HTTP isn’t encrypted.
- With passthrough, traffic stays encrypted from the client all the way to your VM. Only your VMs hold the key.
- Keep the certificate the same on every VM, and renew it on every VM before it expires.
