# 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="/files/thJpwyyb7lan8MCRwS5L" 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="/files/4JBacwOi2WmXQ8Tz8w2u" 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="/files/29QK5PseJavqdN1K8FdU" 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="/files/V6fRpNIv9DOYNOj9xYht" 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="/files/zMUHCarWz0vrxRIjXAjZ" 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="/files/AM9h9hQeWetGEwobG3iJ" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.higiocloud.vn/network/3.-load-balancer/create-virtual-service-vs-on-load-balancing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
