How to use the Elastic Load Balancer provided by the IBM SmartCloud Application Services

The IBM SmartCloud Application Workload Service provides an ‘Elastic Load Balancer’ service or also called ‘ELB’. In this article, and thanks to the help provided by Thomas Mikalsen, I will explain how to setup it.

First what’s the goal of the ELB?

“Elastic load balancing is a shared service that provides routing and load balancing to multiple deployed web applications. It supports both HTTP and HTTPS requests.”

More information can be found in the inforcenter.

Here a general topology when using the ELB with the WebApp Pattern-type:

The ELB is provided as a shared service. For recall, a shared service is a service that can be used by several pattern-types

The ELB shared service must be launched before being used. You can launch the shared service by selecting ‘Cloud’ -> ‘Shared Services’ and then select the ‘ELB Proxy Service’.

and then type on ‘Deploy’.

You can see you have the possibility to enter scalability rules.

Once the service is deployed, you have to enable your virtual application pattern to use this service. In the WebApp pattern-type, you have to add a ‘Routing policy’ on the ‘Enterprise Application’. In the routing policy, you will specify the supported protocols ‘HTTP’/’HPPTS’ and a virutal hostname.

Now, you have to register the virtual hostname in your DNS or in your hosts file (/etc/hosts) with the IP address of the ELB Instance. If you created your ELB service with multiple instances, you will have to use a DNS server that will spread the requests over the different ELB instances.

DNS Entries:

Using wildcard in the domain name will allow you to deploy multiple applications on the same ELB environment. For example, forum.scas.itdove.com, blog.scas.itdove.com…

Once your virtual application pattern is deployed, you can open the application by clicking on the ‘endpoint’ of the WAS server which will popup the url to access the application.