# Create Virtual Service (VS) on Load Balancing

## <mark style="color:green;">Procedure</mark>

Log in to the HI GIO portal as an **Organization Administrator** and Navigate to &#x20;

**Networking > Edge Gateway > Load Balancer >** **Virtual Services.**

Click **ADD.**

{% stepper %}
{% step %}

#### Step 1: Create a Layer 4 Virtual Service <a href="#id-1.-create-a-layer-4-virtual-service" id="id-1.-create-a-layer-4-virtual-service"></a>

&#x20;**Virtual Service** can be created with the required properties:

·       **Name:** Virtual Service name

·       **Service-Engine-Group:** select SEG which assign for each Tenant

·       **Load Balancer Pool:** select Loadbalancer Pool *(example select App-587-Pool)*

·       **Virtual IP:** Select 01 public IP for VIP

·       **Service Type:** L4

·       **Port:** application port (example 587)

<figure><img src="https://3953927389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbvay7AR0CH8vZKgD3dSy%2Fuploads%2Fq1DPTzerSttw3fQVFYn8%2Fimage.png?alt=media&#x26;token=f5d5b252-e936-48de-b446-94512c7c3daf" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Step 2: Create a Layer 7 Virtual Service <a href="#id-1.-create-a-layer-4-virtual-service" id="id-1.-create-a-layer-4-virtual-service"></a>

**Virtual Service** can be created with the required properties:

·       **Name:** Virtual Service name

·       **Service-Engine-Group:** select SEG which assigns to each Tenant

·       **Load Balancer Pool:**&#x20;

o   If Server Pool is running port **80** non-encryption *(example: select IIS-Web-Pool)*

o   If the Server Pool is running port **443** encryption *(example select IIS-Web-443-Pool)*

·       **Virtual IP:** Virtual Service IP Address (VIP)

·       **Service Type:** HTTPS

·       **Certificate:** Select your Certificate

·       **Port:** application port (443 SSL and 80 no-SSL)

***\*Note:** we add port 80 no-SSL for **redirect HTTP-to-HTTPS** request automatically. Usually End users prefer to type domain rather than type* [*https://domain-name*](https://domain-name/)*.*

<figure><img src="https://3953927389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbvay7AR0CH8vZKgD3dSy%2Fuploads%2Fd3WFM5GlNE4i6OnsKCnM%2Fimage.png?alt=media&#x26;token=d2d53ab7-450a-4ba2-af11-2bd8e5f7fb4e" alt=""><figcaption></figcaption></figure>

Press **SAVE** to create the Virtual Service. When this is the first Virtual Service, this might take some time because the Service Engine Virtual Machines need to be deployed. Subsequent virtual services will be faster as they just require a route addition. After a couple of minutes, you should be able to access the Virtual Service.

In some cases, **Virtual Service** has **DOWN** status (**Health**). We have to check Server Pool Status to handle this situation. Example: IIS-Web-443-VS is DOWN.

<figure><img src="https://3953927389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbvay7AR0CH8vZKgD3dSy%2Fuploads%2FB2Yfv5dlfo4NZ1fhUPLQ%2Fimage.png?alt=media&#x26;token=f0ef824f-4a21-4c23-8904-095b45196c2e" alt=""><figcaption></figcaption></figure>

Let’s check Pool Server. We see that IIS-Web-443-VS is mapping to IIS-Web-443-Pool.

This Pool has only 01 Server.

<figure><img src="https://3953927389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbvay7AR0CH8vZKgD3dSy%2Fuploads%2F8TX2P26QJBtR8JUZQcow%2Fimage.png?alt=media&#x26;token=3ca0eef6-4380-4511-b4c2-fdfe57d89f82" alt=""><figcaption></figcaption></figure>

Let's continue to check the server. We see Server 10.1.20.10:443 is DOWN.

Usually, there are 2 situations:

* The server is Off, we need Power it On;
* Or Disable Firewall Rule Server port 443.

<figure><img src="https://3953927389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbvay7AR0CH8vZKgD3dSy%2Fuploads%2Fu5QOhaJ5B8yvORcChUSk%2Fimage.png?alt=media&#x26;token=15a3a6ae-b453-4c81-8735-0168cda14715" alt=""><figcaption></figcaption></figure>

After powering on the VM. The Pool Server is UP again.

So Virtual Service IIS-Web-443-VS is UP also and working.

<figure><img src="https://3953927389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbvay7AR0CH8vZKgD3dSy%2Fuploads%2FWwh3SZEtW6mbf24p0Ejn%2Fimage.png?alt=media&#x26;token=d80fcace-0aa7-4a5c-8bec-c2c5a7b4d7ae" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}
