Forum Discussion
FQDN resolution and used in load balancing
Hello, I am working on requirement where I need to load balance traffic on FQDN. The FQDN is passed to F5 in HTTP header (Header name: backend-server). I have put iRule as below which is working fine.
when HTTP_REQUEST {
set lb_server [HTTP::header "backend-server"]
set lb_port [HTTP::header "backend-port"]
HTTP::header replace "Host" "$lb_server"
set dest [lindex [RESOLV::lookup @8.8.8.8 -a "$lb_server"] 0]
node $dest $lb_port
}
I would like to extend this further if FQDN is resolving in multiple IPs, use those IPs to load balance in round-robin or least connected fashion.
Would anyone know how this can be done? Any idea/suggestions?
Thank you.
Hi,
Create a FQDN node and add the node to the load balancing pool.
The FQDN node list will auto populate all the nodes that are returned by the DNS query; they are called ephemeral nodes. You need to make sure your DNS server is set to return all A records for this to occur.
Cheers,
Kees
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com