Jump toUpdate content

How to set up SSL offloading

Reviewed on 26 May 2021Published on 26 May 2021

Encrypted HTTPS traffic can be handled in two ways with Scaleway Load Balancer. You can either configure a managed SSL Offloading using Let’s Encrypt Certificates or a managed SSL offloading using third party SSL Certificates.

Requirements:

How to configure SSL Passthrough

Passtrough is the simplest form of handling HTTPS traffic on a Load Balancer. As the name suggests, traffic is simply passed through the Load Balancer without being decrypted on it. Whilst this option generates very low overhead, no layer 7 actions can be carried out. This means that no cookie based sticky sessions are possible with this method. In addition, if an application does not share sessions between servers, users’ sessions may get lost by being redirected to different servers of the group.

To configure SSL passtrough:

Create a Frontend Rule listening on port 443 and a backend, listening on port 443 in TCP mode.

If you need help with creating and editing frontends and backends, refer to the documentation on how to manage frontends and backends.

How to configure SSL offloading

SSL offloading means that all HTTPS traffic is decrypted on the Load Balancer and passed to the backend servers in plain HTTP. This means any layer 7 actions may be carried onto the traffic before passing it to the backend hosts. Traffic that has gone through the offloading process is marked with a new header, called X-Forwarded-Proto.

How to configure SSL offloading with Let’s Encrypt SSL certificates

Let’s Encrypt is a non-profit certificate authority (CA) that provides free domain-validated SSL certificates. These certificates are recognized by most modern web browsers as trustworthy. The goal of the project is to make TLS encrypted connections omnipresent on Internet servers. Therefore the solution is easy to install and to maintain and it is possible to generate SSL/TLS certificates directly from your Scaleway Console.

  1. Click Load Balancer in the Network section of the Scaleway Console side menu. The Load Balancer dashboard displays.

  2. Click the Load Balancer you want to configure. The Load Balancer information page displays.

  3. Click the SSL Certificates tab.

  4. Click Create a SSL certificate.

  5. Enter the required details for the SSL certificate, which include:

    • SSL Certificate Name: The name of your choice to faciliate certificate management.
    • SSL Certificate Type: The type for the SSL certificate, select Let’s Encrypt from the drop-down list.
    • SSL Common Name: The common name which is the main domain name linked to the certificate.
    • SSL Subject Alternative Names: If the certificat should be valid for multiple domain names, enter all additional domain names.
  6. Click Create SSL certificate to request the certificate at the Let’s Encrypt authority.

Note:

Let’s Encrypt certficiates have by default a validity of 90 days and are renewed automatically from our side before the expiry date. You do not have to worry that your certificate may expire and become invalid.

How to configure SSL offloading using a third party SSL certificate

Scaleway Load Balancer supports also third party SSL Certificates. These are certificates issued by a certificate authoriy (CA) other than Let’s Encrypt. Depending on the CA, they can offer extended validation certificates which require full verification of the requesting entity’s legal identity before issuing the certificate. These certificates can be useful for websites that require a high trust level, like e-commerce or government websites, and can be imported easily into the Load Balancer configuration from the management console.

  1. Click Load Balancer in the Network section of the Scaleway Console side menu. The Load Balancer dashboard displays.

  2. Click the Load Balancer you want to configure. The Load Balancer information page displays.

  3. Click the SSL Certificates tab.

  4. Click Create a SSL certificate.

  5. Enter the required details for the SSL certificate, which include:

    • SSL Certificate Name: The name of your choice to faciliate certificate management.
    • SSL Certificate Type: The type for the SSL certificate, select Import certificate from the drop-down list.
    • SSL Third Party Certificate: The full PEM-formatted certificate, including the entire certificate chain including public key, private key, and optionally certificate authorities. You may have received thse information either in a combined file or in several seperate files from your certificate authority (CA). Contact them for more details how to combine the information if you received the chain diveded into multiple files.
  6. Click Create SSL certificate to check and import your third party SSL certificate.

Note:

Third party certficiates have a given validity set by your certificate authority. Unfortunately we can not automatically manage and renew them for you. Make sure to renew your certificate before expiration and upload the new certficate to avoid connection errors caused by experienced certificates.

How to configure frontends and backends

You should now create or edit your frontend and backend with your SSL Certificate. On the product information page:

  1. Click Load Balancer in the Network section of the Scaleway Console side menu. The Load Balancer dashboard displays.

  2. Click the Load Balancer you want to configure. The Load Balancer information page displays.

  3. Click the Frontend tab.

  4. Click Add Frontend.

  5. Configure both the frontend and the backend:

    • For the frontend enter:
      • Frontend name: A friendly name for the frontend
      • Port: The port number on which the frontend listens. Enter 443 to configure the Load Balancer to listen on the standard HTTPS port.
      • SSL Certificate: Choose the SSL Certificate to use from the drop-down list.
    • For the backend enter:
      • Backend name: A friendly name for the backend
      • Protocol: The protocol to use for the backend. Choose HTTP from the drop-down list.
      • Port: The port on which the backend application listens. Enter 80 to configure the load balancer to communicate with the backend on the standard HTTP port.
      • Proxy: Enable this option, to use the Proxyv2 protocol.
      • Sticky Session: Enables the load balancer to bind a user’s session to a specific instance. This ensures that all subsequent sessions from the user are sent to the same instance, while there is at least one active session.
      • Health Check: Configure a HTTP health check to detect if the backend application is available.
      • Server IP(s): Enter the IP address of the server(s) running the backend application.
  6. Click Add Frontend to setup the new frontend and backend.

  7. Open a web browser and point it to https://common_name. Make sure to replace common_name with the main domain configured in the SSL certificate. The connection is now encrypted with SSL.

See Also