# Tạo Pool trong Load Balancing

## <mark style="color:green;">Quy trình</mark> <a href="#id-2.-guidance" id="id-2.-guidance"></a>

* **Bước 1**: Đăng nhập vào HI GIO PORTAL với quyền Organization Administrator và điều hướng đến

&#x20;      **Networking** > **Edge Gateway** > **Load Balancer** > **Pool**.

* **Bước 2**: Nhấn **ADD** để tạo và cấu hình một load balancer pool.

{% tabs %}
{% tab title="1. Tạo pool cho ứng dụng không mã hóa" %}
**General Settings Tab:**

* *<mark style="color:green;">**Name:**</mark>* <mark style="color:green;">nhập tên pool (ví dụ IIS-Web-Pool)</mark>
* *<mark style="color:green;">**Default Server Port:**</mark>* <mark style="color:green;">Cổng máy chủ đích được sử dụng bởi lưu lượng gửi đến các thành viên (ví dụ 80)</mark>
* *<mark style="color:green;">**Load Balancer Algorithm:**</mark>* <mark style="color:green;">(ví dụ Round Robin</mark>*<mark style="color:green;">)</mark>*

<mark style="color:green;">NSX ALB hỗ trợ các phương pháp cân bằng tải khác nhau:</mark>

*<mark style="color:green;">Consistent Hash</mark>*

*<mark style="color:green;">Core Affinity</mark>*

*<mark style="color:green;">Fastest Response</mark>*

*<mark style="color:green;">Fewest Servers</mark>*

*<mark style="color:green;">Least Connections</mark>*

*<mark style="color:green;">Least Load</mark>*

*<mark style="color:green;">Round Robin</mark>*

* *<mark style="color:green;">**Persistence:**</mark> <mark style="color:green;"></mark><mark style="color:green;">Profile</mark>* <mark style="color:green;"></mark><mark style="color:green;">persistence sẽ đảm bảo rằng người dùng giữ kết nối với cùng một máy chủ trong một khoảng thời gian mong muốn (ví dụ: Client IP)</mark>

<mark style="color:green;">NSX ALB hỗ trợ các loại</mark> <mark style="color:green;"></mark><mark style="color:green;">**Persistence**</mark> <mark style="color:green;"></mark><mark style="color:green;">khác nhau:</mark>

*<mark style="color:green;">System-Persistence-App-Cookie</mark>*

*<mark style="color:green;">System-Persistence-Client-IP</mark>*

*<mark style="color:green;">System-Persistence-Custom-HTTP-Header</mark>*

*<mark style="color:green;">System-Persistence-HTTP-Cookie</mark>*

*<mark style="color:green;">System-Persistence-TLS</mark>*

* *<mark style="color:green;">**Active Health Monitor:**</mark>* <mark style="color:green;">(ví dụ HTTP - Điều này sẽ gửi các yêu cầu HEAD HTTP định kỳ tới mỗi máy chủ trong Pool để kiểm tra tính khả dụng)</mark>

  <figure><img src="https://content.gitbook.com/content/dOZ82gj0wvhbAUlxBHpj/blobs/586S3Fg7S0Ir7vXJPUpR/image.png" alt=""><figcaption></figcaption></figure>
* Thêm hai hoặc nhiều mục trong tab **Members** và nhập Địa chỉ IP và Port từ các VM chạy các máy chủ ứng dụng.

<figure><img src="https://content.gitbook.com/content/dOZ82gj0wvhbAUlxBHpj/blobs/Yd8U3vzdNBWuPm2A6LCj/image.png" alt=""><figcaption></figcaption></figure>

* Nhấn **SAVE** để tạo một pool không mã hóa (non-encrypted)
  {% endtab %}

{% tab title="2. Create a pool for encrypted application" %}
**General Settings Tab:**

* *<mark style="color:green;">**Name:**</mark>* <mark style="color:green;">nhập tên pool (ví dụ IIS-Web-Pool)</mark>
* *<mark style="color:green;">**Default Server Port:**</mark>* <mark style="color:green;">Cổng máy chủ đích được sử dụng bởi lưu lượng gửi đến các thành viên (ví dụ 443)</mark>
* *<mark style="color:green;">**Load Balancer Algorithm:**</mark> <mark style="color:green;"></mark><mark style="color:green;">(</mark>*<mark style="color:green;">ví dụ</mark> <mark style="color:green;"></mark>*<mark style="color:green;">Round Robin)</mark>*

<mark style="color:green;">NSX ALB hỗ trợ các phương pháp cân bằng tải khác nhau:</mark>

*<mark style="color:green;">Consistent Hash</mark>*

*<mark style="color:green;">Core Affinity</mark>*

*<mark style="color:green;">Fastest Response</mark>*

*<mark style="color:green;">Fewest Servers</mark>*

*<mark style="color:green;">Least Connections</mark>*

*<mark style="color:green;">Least Load</mark>*

*<mark style="color:green;">Round Robin</mark>*

* *<mark style="color:green;">**Persistence:**</mark> <mark style="color:green;"></mark><mark style="color:green;">Persistence profile</mark>* <mark style="color:green;"></mark><mark style="color:green;">sẽ đảm bảo rằng người dùng giữ kết nối với cùng một máy chủ trong một khoảng thời gian mong muốn (ví dụ: Client IP)</mark>

<mark style="color:green;">NSX ALB hỗ trợ các loại Persistence khác nhau:</mark>

*<mark style="color:green;">System-Persistence-App-Cookie</mark>*

*<mark style="color:green;">System-Persistence-Client-IP</mark>*

*<mark style="color:green;">System-Persistence-Custom-HTTP-Header</mark>*

*<mark style="color:green;">System-Persistence-HTTP-Cookie</mark>*

*<mark style="color:green;">System-Persistence-TLS</mark>*

* *<mark style="color:green;">**Active Health Monitor:**</mark>* <mark style="color:green;">(ví dụ HTTPS - Điều này sẽ gửi các yêu cầu HEAD HTTPS định kỳ tới mỗi máy chủ trong Pool để kiểm tra tính khả dụng)</mark>

<figure><img src="https://content.gitbook.com/content/dOZ82gj0wvhbAUlxBHpj/blobs/AhbdCnIKICfsA33ua6gX/image.png" alt=""><figcaption></figcaption></figure>

* Thêm hai hoặc nhiều mục trong tab **Members** và nhập Địa chỉ IP và Port từ các VMs chạy các máy chủ ứng dụng.

<figure><img src="https://content.gitbook.com/content/dOZ82gj0wvhbAUlxBHpj/blobs/8f0k7IjbgaswRLDMG6UE/image.png" alt=""><figcaption></figcaption></figure>

**Tab Cài đặt SSL**:

* *<mark style="color:green;">**SSL Enable:**</mark>* <mark style="color:green;">Bật</mark>
* *<mark style="color:green;">**Hide Service Certificates:**</mark>* <mark style="color:green;">Tắt</mark>
* *<mark style="color:green;">**Select one or more certificates to be used by the Load Balancer Pool:**</mark>* <mark style="color:green;"></mark><mark style="color:green;">Chọn chứng chỉ của bạn</mark>

<figure><img src="https://content.gitbook.com/content/dOZ82gj0wvhbAUlxBHpj/blobs/ubvdQHlAaBDmYJuh1XLd/image.png" alt=""><figcaption></figcaption></figure>

* Nhấn **SAVE** để tạo một pool mã hóa.
  {% endtab %}
  {% endtabs %}

{% hint style="success" %}

#### **Default Active Health Monitor:** <a href="#default-active-health-monitor" id="default-active-health-monitor"></a>

{% endhint %}

<figure><img src="https://content.gitbook.com/content/dOZ82gj0wvhbAUlxBHpj/blobs/yDJFW2EXJ7e3W81AQRCM/image.png" alt=""><figcaption><p>Active Health Monitor Flow</p></figcaption></figure>

* **HTTP/HTTPS:**
  * Send Interval: 10s
  * Receive Timeout: 4s
  * Successful Checks: 3
  * Failed Checks: 3
  * Health Monitor Port: use the Default Server Port of the pool.
  * HTTP request: HEAD / HTTP/1.0
  * Response Code: 2xx, 3xx
* **TCP**:
  * Send Interval: 10s
  * Receive Timeout: 4s
  * Successful Checks: 2
  * Failed Checks: 2
  * Health Monitor Port: use the Default Server Port of the pool.
* **UDP:**
  * Send Interval: 4s
  * Receive Timeout: 2s
  * Successful Checks: 2
  * Failed Checks: 2
  * Health Monitor Port: use the Default Server Port of the pool.
* **PING:**
  * Send Interval: 10s
  * Receive Timeout: 4s
  * Successful Checks: 2
  * Failed Checks: 2


---

# 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/hi-gio-user-guide-vn/network/3.-load-balancer/tao-pool-trong-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.
