# Load balancing based on file content

**URL:** <https://community.f5.com/t/load-balancing-based-on-file-content/74293>\
**Category:** Technical Forums\
**Tags:** health-monitor\
**Created:** [April 3, 2024, 4:21pm UTC](https://community.f5.com/t/load-balancing-based-on-file-content/74293 "2024-04-03T16:21:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deena](https://avatars.discourse-cdn.com/v4/letter/d/8e7dd6/32.png) [@Deena](https://community.f5.com/u/Deena)\
**Post date:** [April 3, 2024, 4:21pm UTC](https://community.f5.com/t/load-balancing-based-on-file-content/74293/1 "2024-04-03T16:21:06Z")

</div>

Hi All, I’ve done some reading but I can’t seem to find a solution to what I’m trying to achieve. I would like to set up load balancing based on the receive string from a file on a server. My setup is as follows:

2 Servers in a pool, A & B

Each server has a file that needs to be queried. If the receive string is “ok” traffic is distributed based on the round robin method. If the receive string from 1 of the servers is changed load balancing is then based on priority group setting, where server A=1 and B=5.

Unlike like a health monitor, I need both servers to be able to received traffic, but distributed based on the priority group setting for the server.

Somehow this was accomplished on the A10, but I’m having a hard time trying to replicate it on the F5.

Any thoughts or suggestions on our I can achieve.

Thanks in advance for your help.

Cheers

Deena

---

<div class="post-metadata">

**Author:** ![Ben\_Novak](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/ben_novak/32/3722_2.png) [@Ben\_Novak](https://community.f5.com/u/Ben_Novak)\
**Post date:** [April 4, 2024, 2:00pm UTC](https://community.f5.com/t/load-balancing-based-on-file-content/74293/2 "2024-04-04T14:00:47Z")

</div>

My first thought is that this can be done with an iRule, however it’s pretty complicated.&nbsp; I suggest looking at some of our advanced LB methods to see if Dynamic or even Predictive could work.&nbsp; This could drastically simplify the configuration.

K42275060: There are several Load Balancing Methods. Which one is best for your environment?

> **[myF5](https://my.f5.com/manage/s/article/K42275060)**
