Forum Discussion
IRule http redirect https
you should have 2 virtual servers. one is listening on port 80 and has redirection irule.
the other virtual server is listening on port 443. if you use pool member which is on port 443, just use tcp profile i.e. no clientssl, serverssl and http profiles. however, if pool member is on port 80, you have to assign clientssl profile to the virtual server. for testing, default clientssl profile would be fine.
- Philippe_CLOUPAug 14, 2024
Employee
Hi ajay1986 ,
i assume that you refer to a BIG-IP platform, correct ?
you mention script or automation as an option, so i assume that having an iRule will not be okay to cover your need.
I would recommend creating 2 pools with different weight:
pool 1 - member A prio 100, member B prio 50
pool 2 - member A prio 50, member B prio 100
with the automation, you switch from one pool to the other every 3 hours (it can be an iCall running locally on the BIG-IP).
In that case, if one of your pool member is failing (server down, upgrade, ...) you still work on the remaining pool.
If the idea of running an iCall locally seems ok, let me know, i can send you an example. If you want something external (using API calls, ANSIBLE, Terraform, ...) let me know.
This can be achieved with 1 pool and changing the pool members prio from automation too.
regards
Thanks for the reply Philippe , it would be great if you can help with ansible script.
- Philippe_CLOUPAug 21, 2024
Employee
Hi ajay1986, here after an example of Ansible Playbook that can be used to do the equivalent config change (look specially at the "priority group" values in the items list of pool members
--- - name: Create a VIP, pool and pool members hosts: all connection: local vars: provider: password: "MyPassword" server: 12.34.45.56 user: admin validate_certs: no server_port: 443 tasks: - name: Create a pool bigip_pool: provider: "{{ provider }}" lb_method: ratio-member name: web slow_ramp_time: 120 priority_group_activation: 1 delegate_to: localhost - name: Add members to pool bigip_pool_member: provider: "{{ provider }}" description: "webserver {{ item.name }}" host: "{{ item.host }}" name: "{{ item.name }}" priority_group: "{{ item.priority_group }}" pool: web port: 80 with_items: - host: 10.10.10.10 name: web01 priority_group: 10 - host: 10.10.10.20 name: web02 priority_group: 1 delegate_to: localhost
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