> For the complete documentation index, see [llms.txt](https://docs.glesys.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.glesys.com/products/connectivity/load-balancer/how-tos/understand-targets-weights.md).

# Understand targets' weights

A target's weight determines how much traffic it will receive.

***

For the examples here, we'll continue with the HTTP load balancer from [Create a HTTP load balancer](/products/connectivity/load-balancer/how-tos/create-a-http-load-balancer.md). This assumes three web servers as targets, each one serving a web page with the server name in the `<title>` tag.

If we had assigned the first server—*web1*—a weight of five, while the other two servers each had a weight of one, the first server would receive five requests while the other two would each receive one request.

We run the test script below again.

{% code title="test-lb.sh" %}

```bash
#!/bin/bash
x=1
while [ $x -le 15 ]
do
  curl -s http://203.0.113.155 | grep "<title>"
  x=$(( $x + 1 ))
done
```

{% endcode %}

Running the script will, in this example, where the first server has a weight of five, output the following (or similar to it):

{% code title="Example output" %}

```terminal
  <title>Web Server 1</title>
  <title>Web Server 1</title>
  <title>Web Server 1</title>
  <title>Web Server 1</title>
  <title>Web Server 1</title>
  <title>Web Server 1</title>
  <title>Web Server 1</title>
  <title>Web Server 1</title>
  <title>Web Server 3</title>
  <title>Web Server 1</title>
  <title>Web Server 1</title>
  <title>Web Server 3</title>
  <title>Web Server 1</title>
  <title>Web Server 1</title>
  <title>Web Server 2</title>
```

{% endcode %}

If we instead lower the weight of the first server to two, that server will receive two requests while the other servers will each receive one. A new test confirms this to be correct:

{% code title="Example output" %}

```terminal
  <title>Web Server 1</title>
  <title>Web Server 1</title>
  <title>Web Server 3</title>
  <title>Web Server 3</title>
  <title>Web Server 1</title>
  <title>Web Server 2</title>
  <title>Web Server 1</title>
  <title>Web Server 1</title>
  <title>Web Server 1</title>
  <title>Web Server 3</title>
  <title>Web Server 1</title>
  <title>Web Server 2</title>
  <title>Web Server 2</title>
  <title>Web Server 3</title>
  <title>Web Server 1</title> 
```

{% endcode %}
