Forum Discussion
send connections to pool based on host header
Hello,
In an effort to reduce the number of public IPs we use, I'm trying to create an irule that will send connections to the proper pool based on host name. To do this, I was thinking of using a data group and came up with the following. The problem is it doesn't seem to work. Does anyone see anything horribly wrong with what I did?
when HTTP_REQUEST {
My data group (PoolSelector) is type string with entries like the following
makeme.site.net := serverGroupA_pool
asammich.site.net := serverGroupB_pool
Thanks,
Eric
3 Replies
- Kevin_Stewart
Employee
I don't see anything immediately wrong with it. Try adding a log statement at the beginning of the event declaration to show the incoming [HTTP::host] value, and another to show what $usepool equals.
Does it not work at all, or intermittently? Do you have a OneConnect profile applied to the VIP?
Are you seeing any errors in the LTM logs? - Jnon
Nimbostratus
Eric
Are you stating you have some pool members with public addresses?
I'm not getting where the public addresses your referring to are. - Eric_123944
Nimbostratus
Hi Kevin,
Thanks for your help. The [HTTP::host] and pool names were coming out correctly. It seems that it didn't like that I was pointing to some pools that were created via iapp. It was logging
TCL error: /Common/OneRule - no such pool: serverGroupA_pool (line 1) invoked from within "pool $usepool"
When I created pools manually, it worked just fine.
Hi J,
We were doing a 1:1 NAT from the public to the virtual IP, so practically every node gets mapped to it's own public IP. You might imagine how over time we have amassed quite a large amount of public addresses, with more servers going up all the time. Being able to use several pools under one VIP makes things a lot easier for me. I don't need to beg for more addresses every few months, and I don't need to worry about public DNS if I need to move a URL to a new server. I would just need to update the pool it uses in the data group and it would instantly take effect.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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