> For the complete documentation index, see [llms.txt](https://docs-epc.gitbook.io/ncs-documents/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-epc.gitbook.io/ncs-documents/load-balancing/load-balancer/using-network-load-balancing/using-weighted-round-robin-backend-group.md).

# Using Weighted Round Robin Backend Group

## Prerequisite

* มียอดคงเหลือใน Project มากกว่า 0 บาท ([ขั้นตอนการเติมเงินเข้าสู่ Project](/ncs-documents/nipa-cloud-space-overview/billing-and-wallet/topup-a-project-wallet.md))
* มี Load Balancer พร้อมใช้งาน ([ขั้นตอนการสร้าง Load Balancer](/ncs-documents/load-balancing/load-balancer/create-load-balancer.md))

## Instructions

ในการใช้งาน Algorithm Round Robin แบบกำหนด Weight นั้น จะต้องกำหนดจาก Backend Group ภายใน Load Balancer โดยสามารถกำหนดได้ตั้งแต่ขั้นตอนการสร้าง Backend Group หรือ แก้ไขภายหลังในการแก้ไข Backend Group ก็ได้

<figure><img src="/files/341ELXdteyjpjB6RlLFl" alt=""><figcaption></figcaption></figure>

โดยมีขั้นตอนดังนี้

### 1. เลือก Algorithm

เลือก Algorithm "Round Robin"&#x20;

{% hint style="info" %}
จริงๆ แล้ว ทุก Algorithm สามารถกำหนด Weight ได้ทั้งหมด โดยจะมี logic ในการกำหนด priority ของ Member ที่ต่างกัน
{% endhint %}

<figure><img src="/files/lpMoVN9p4ehg2gpTEeD3" alt=""><figcaption></figcaption></figure>

### 2. กำหนด Weight ของ Members

กำหนด Weight ของแต่ละ Members โดย Member ที่มี Weight มากกว่า จะถูกใช้งานมากกว่า ตามอัตราส่วนของ Weight

<figure><img src="/files/YldjzxXnSuHrx9CL3ZfT" alt=""><figcaption></figcaption></figure>

เพียงเท่านี้ก็สามารถใช้งาน Weighted Round Robin ได้แล้ว
