Forum Discussion
Bjarne_10209
Nimbostratus
Dec 05, 2011source addr persistence and member selection across pools
Hi I am at a customer that have a problem with cookie persitence. I can solve this by using source address affinity persistence instead, but I have question if this can cause a problem in t...
nitass
Employee
Dec 06, 2011it seems to be okay for me. i am running 10.2.3. please let me know if i missed anything.
[root@ve1023:Active] config b virtual bar list
virtual bar {
snat automap
destination 172.28.19.79:80
ip protocol 6
rules myrule
persist mypersist
profiles {
http {}
tcp {}
}
}
[root@ve1023:Active] config b profile mypersist list
profile persist mypersist {
defaults from source_addr
mode source addr
timeout indefinite
}
[root@ve1023:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
log local0. "client: [IP::remote_addr]:[TCP::remote_port]"
log local0. "host: [HTTP::host]"
log local0. "uri: [HTTP::uri]"
if {[HTTP::uri] equals "/test1"} {
pool foo1
} else {
pool foo2
}
}
when LB_SELECTED {
log local0. "pool: [LB::server pool]"
log local0. "member: [LB::server addr]"
}
when LB_FAILED {
log local0. "just in case"
}
when HTTP_RESPONSE {
log local0. "server: [IP::remote_addr]:[TCP::remote_port]"
}
}
[root@ve1023:Active] config b persist show all
No Persistence Table Entries were found.
[root@ve1023:Active] config curl -I http://172.28.19.79/test1
HTTP/1.1 404 Not Found
Date: Tue, 06 Dec 2011 05:27:48 GMT
Server: Apache/2.2.3 (CentOS)
Connection: close
Content-Type: text/html; charset=iso-8859-1
[root@ve1023:Active] config
Dec 5 21:27:34 local/tmm info tmm[8145]: Rule myrule HTTP_REQUEST: client: 172.28.19.80:44874
Dec 5 21:27:34 local/tmm info tmm[8145]: Rule myrule HTTP_REQUEST: host: 172.28.19.79
Dec 5 21:27:34 local/tmm info tmm[8145]: Rule myrule HTTP_REQUEST: uri: /test1
Dec 5 21:27:34 local/tmm info tmm[8145]: Rule myrule LB_SELECTED: pool: foo1
Dec 5 21:27:34 local/tmm info tmm[8145]: Rule myrule LB_SELECTED: member: 200.200.200.101
Dec 5 21:27:34 local/tmm info tmm[8145]: Rule myrule HTTP_RESPONSE: server: 200.200.200.101:80
[root@ve1023:Active] config b persist show all
PERSISTENT CONNECTIONS
| Mode source addr Value 172.28.19.80
| virtual 172.28.19.79:80 node 200.200.200.101:80 age 4sec
[root@ve1023:Active] config curl -I http://172.28.19.79/other
HTTP/1.1 404 Not Found
Date: Tue, 06 Dec 2011 05:28:13 GMT
Server: Apache/2.2.3 (CentOS)
Connection: close
Content-Type: text/html; charset=iso-8859-1
[root@ve1023:Active] config
Dec 5 21:27:58 local/tmm info tmm[8145]: Rule myrule HTTP_REQUEST: client: 172.28.19.80:44903
Dec 5 21:27:58 local/tmm info tmm[8145]: Rule myrule HTTP_REQUEST: host: 172.28.19.79
Dec 5 21:27:58 local/tmm info tmm[8145]: Rule myrule HTTP_REQUEST: uri: /other
Dec 5 21:27:58 local/tmm info tmm[8145]: Rule myrule LB_SELECTED: pool: foo2
Dec 5 21:27:58 local/tmm info tmm[8145]: Rule myrule LB_SELECTED: member: 200.200.200.101
Dec 5 21:27:58 local/tmm info tmm[8145]: Rule myrule HTTP_RESPONSE: server: 200.200.200.101:80
[root@ve1023:Active] config b persist show all
PERSISTENT CONNECTIONS
| Mode source addr Value 172.28.19.80
| virtual 172.28.19.79:80 node 200.200.200.101:80 age 29sec
| Mode source addr Value 172.28.19.80
| virtual 172.28.19.79:80 node 200.200.200.101:80 age 5sec
[root@ve1023:Active] config b pool foo1 member 200.200.200.101:80 monitor fake
[root@ve1023:Active] config b pool foo1 |grep -i pool\ member
+-> POOL MEMBER foo1/200.200.200.101:80 inactive,down
+-> POOL MEMBER foo1/200.200.200.102:80 active,unchecked
[root@ve1023:Active] config b persist show all
PERSISTENT CONNECTIONS
| Mode source addr Value 172.28.19.80
| virtual 172.28.19.79:80 node 200.200.200.101:80 age 113sec
| Mode source addr Value 172.28.19.80
| virtual 172.28.19.79:80 node 200.200.200.101:80 age 89sec
[root@ve1023:Active] config curl -I http://172.28.19.79/test1
HTTP/1.1 404 Not Found
Date: Tue, 06 Dec 2011 05:28:30 GMT
Server: Apache/2.2.3 (CentOS)
Connection: close
Content-Type: text/html; charset=iso-8859-1
[root@ve1023:Active] config
Dec 5 21:29:36 local/tmm info tmm[8145]: Rule myrule HTTP_REQUEST: client: 172.28.19.80:35084
Dec 5 21:29:36 local/tmm info tmm[8145]: Rule myrule HTTP_REQUEST: host: 172.28.19.79
Dec 5 21:29:36 local/tmm info tmm[8145]: Rule myrule HTTP_REQUEST: uri: /test1
Dec 5 21:29:36 local/tmm info tmm[8145]: Rule myrule LB_SELECTED: pool: foo1
Dec 5 21:29:36 local/tmm info tmm[8145]: Rule myrule LB_SELECTED: member: 200.200.200.102
Dec 5 21:29:36 local/tmm info tmm[8145]: Rule myrule HTTP_RESPONSE: server: 200.200.200.102:80
[root@ve1023:Active] config b persist show all
PERSISTENT CONNECTIONS
| Mode source addr Value 172.28.19.80
| virtual 172.28.19.79:80 node 200.200.200.102:80 age 5sec
| Mode source addr Value 172.28.19.80
| virtual 172.28.19.79:80 node 200.200.200.101:80 age 103sec
[root@ve1023:Active] config curl -I http://172.28.19.79/other
HTTP/1.1 404 Not Found
Date: Tue, 06 Dec 2011 05:30:32 GMT
Server: Apache/2.2.3 (CentOS)
Connection: close
Content-Type: text/html; charset=iso-8859-1
[root@ve1023:Active] config
Dec 5 21:30:18 local/tmm info tmm[8145]: Rule myrule HTTP_REQUEST: client: 172.28.19.80:35155
Dec 5 21:30:18 local/tmm info tmm[8145]: Rule myrule HTTP_REQUEST: host: 172.28.19.79
Dec 5 21:30:18 local/tmm info tmm[8145]: Rule myrule HTTP_REQUEST: uri: /other
Dec 5 21:30:18 local/tmm info tmm[8145]: Rule myrule LB_SELECTED: pool: foo2
Dec 5 21:30:18 local/tmm info tmm[8145]: Rule myrule LB_SELECTED: member: 200.200.200.101
Dec 5 21:30:18 local/tmm info tmm[8145]: Rule myrule HTTP_RESPONSE: server: 200.200.200.101:80
[root@ve1023:Active] config b persist show all
PERSISTENT CONNECTIONS
| Mode source addr Value 172.28.19.80
| virtual 172.28.19.79:80 node 200.200.200.102:80 age 49sec
| Mode source addr Value 172.28.19.80
| virtual 172.28.19.79:80 node 200.200.200.101:80 age 7sec
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects