Forum Discussion
Is it possible to change vservers according to a specified time?
I plan to use viprion 2250 blade as a TCP optimizer. I was wondering if it was possible to create several vservers with different TCP profiles, and have them changed automatically according to time.
For example:
vserver1 would have TCP optimizing profile for Saturday and Sunday;
vserver2 would have TCP optimizing profile for weekday day time;
vserver3 would have TCP optimizing profile for weekday night time; etc.
6 Replies
- Yann_Desmarest_
Nacreous
Hi,
This is something you can manage using iControl REST API to query and provision the right tcp profile to a VS. You can develop a script that change the tcp profile assigned to each VS based on a time schedule in a cron job on the Bigip.
Just pay attention that cron configuration doesn't survive an upgrade.
- Naushad_278428
Nimbostratus
Thank you for your quick answer. I will try to do it via icontrol or icall.
Hi,
This is something you can manage using iControl REST API to query and provision the right tcp profile to a VS. You can develop a script that change the tcp profile assigned to each VS based on a time schedule in a cron job on the Bigip.
Just pay attention that cron configuration doesn't survive an upgrade.
- Naushad_278428
Nimbostratus
Thank you for your quick answer. I will try to do it via icontrol or icall.
Hi Shakoor,
its not possible to switch a VS configuration nor change entire TCP profiles within iRules (at least not without using a [SIDEBAND] connections pointing to the local iControl REST API - which I strongly wouldn't recommend to do^^)
The far better solution would be to use a periodic triggered
script or even an external Management System (attached via REST API) to reconfigure the settings as required. The benefit of those approaches are, that they wouldn't affect the TMOS data plane at all (e.g. perform schedule checks on each TCP connection or even HTTP request etc). iCall or REST API would instead perform an Out-of-Band configuration change, without having an noticable performance impact...iCallCheers, Kai
Hi Shakoor,
to change a TCP profile (or issue other TMSH command lines as needed) on a periodic interval you may use the rather simple iCall scripts and handlers below. The provided example will flip the client/server side TCP protocols every 30 seconds...
sys icall script TCP_Profile_LAN_WAN_SWAP { app-service none definition { tmsh::log "iCall: Swapping the TCP_Profile from LAN to WAN" tmsh::modify /ltm virtual VS_HTTPS_211 { profiles replace-all-with { tcp-lan-optimized { context clientside } tcp-wan-optimized { context serverside } http {} httpcompression { } clientssl { context clientside } serverssl { context serverside } } } } description none events none } sys icall script TCP_Profile_LAN_WAN_FIX { app-service none definition { tmsh::log "iCall: Fixing the TCP_Profile settings" tmsh::modify /ltm virtual VS_HTTPS_211 { profiles replace-all-with { tcp-lan-optimized { context serverside } tcp-wan-optimized { context clientside } http {} httpcompression { } clientssl { context clientside } serverssl { context serverside } } } } description none events none } sys icall handler periodic TCP_Profile_LAN_WAN_SWAP { first-occurrence 2016-08-09:15:00:00 interval 60 script TCP_Profile_LAN_WAN_SWAP } sys icall handler periodic TCP_Profile_LAN_WAN_FIX { first-occurrence 2016-08-09:15:00:30 interval 60 script TCP_Profile_LAN_WAN_FIX }Note: You have to adopt the settings to match your Virtual Server name(s), the desired profiles settings and the periodic intervals (in seconds) as needed. Then use
to import and merge the partial configuration.tmsh load sys config merge from-terminalCheers, Kai
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