Forum Discussion
lfhx_54443
Nimbostratus
May 22, 2007help: node priority change in one pool
Hi
I got some requirement below:
2 members in one pool
the one menber(node1)'s application start:
if both 2 menbers up {
if node1 has higher priority {
mark itself with as active
start service traffic
}
else if node2 has higher priority {
mark node1 as standby
do nothing
}
}
when node1(the higher priority) down:
node2 swap priority with node1
mark node2 as active and take over traffic
when node1 up again:
node1 find node2 is up and has hogher priority
mark itself as standby and do nothing
can iControl realize this?
I have little competence about iControl can anybody give me some help?
Great thanks !
9 Replies
- Allen_Mao_3723
Nimbostratus
and i consider using EventSubscription and EventNotification interface to realize it,but i am confused with Notification, how can it work?
could u give a simple example? - The EventNotification and EventSubscription interfaces work as follows:
1. Create a listener that implements the EventNotification interface and deploy this on a webserver of your choosing.
2. Create a subscription on the BIG-IP with the EventSubscription interface, specifying the location of your listening endpoint created in step 1.
Then if a system event occurs that matches the specs your defined in your event subscription, one or more method calls of EventNotification::events_occurred() will be sent to your endpoint containing the relevant data.
Look in the SDK under the Management Samples for various examples of the client and server pieces (I believe the only server piece right now in the SDK is written in .NET).
-Joe - Allen_Mao_3723
Nimbostratus
Hi,Joe
It works well as I follow your suggestion.
But I have an another question,
If I create a listener that implements the EventNotification interface but not use webservice, I just do subscription and I will develop a http web server by myself,when a system event occurs that matches the specs your defined in your event subscription, BIG_IP will send events to my own web server?? I do not use webservice
Can BIG_IP work in EventNotification and EventSubscription without webservice?? - The notification mechanism is via a HTTP-POST call formatted as a SOAP message. If you don't want to implement a webservice listener, then you can still build a listener that works. The only requirements is that you make it "look" like a web service. You'll need to be able to parse the SOAP content in the HTTP POST body. And after that you'll need to return a response with a valid SOAP response indicating success. Here's a response returned from the BIG-IP default listener
HTTP/1.1 200 OK Date: Fri, 08 Jun 2007 14:56:13 GMT Server: Apache Secure; Connection: close Transfer-Encoding: chunked Content-Type: text/xml; charset="UTF-8" 1cexmlns:E="http://schemas.xmlsoap.org/soap/envelope/" xmlns:A="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://www.w3.org/2001/XMLSchema-instance" xmlns:y="http://www.w3.org/2001/XMLSchema" xmlns:iControl="urn:iControl" E:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">xmlns:m="urn:iControl:Management/EventNotification"> 0
If you go that route, good luck. We'll do our best, but if you are rolling your own implementation, then it might be harder for us to help you out if you get stuck.
-Joe - Allen_Mao_3723
Nimbostratus
If my listener just init a ServerSocket(8080), whether BIG-IP send the events to my listener when some events happened? - Allen_Mao_3723
Nimbostratus
And if i build a listener that works "look" like a web service, how can I set the SubscriptionDetails's parameter url? Posted By Allen Mao on 06/10/2007 5:45 AM
If my listener just init a ServerSocket(8080), whether BIG-IP send the events to my listener when some events happened?
I don't understand your question. Could you try to explain it again?
-JoePosted By Allen Mao on 06/10/2007 11:38 PM
And if i build a listener that works "look" like a web service, how can I set the SubscriptionDetails's parameter url?
The process is two steps.
1. Creation of the subscription.
You will need to use some web services client code connecting to the EventSubscription interface to create the subscription pointing to the URL of your endpoint.
2. Create a listener.
When an event occurs that matches the specification in the created subscription, it will send a HTTP Post message containing the events_occurred SOAP method to the supplied endpoint in 1. At this point, your endpoint will either have to use a built-in webservice toolkit to implement the parsing of the listener, or if you choose to build your own parsing, you will have to pull the HTTP request out of your listening socket and parse the HTTP request containing the SOAP Body in the body section of the HTTP Post. You will then need to return the SOAP response detailed above in the HTTP response sent back to the BIG-IP.
Unfortunately, I haven't built custom HTTP parsers so I can't be of much more help than this.
-Joe- Tom_Thunem_9204
Nimbostratus
Hello,
did you ever find a solution to this problem? I think I have the same requirement.
Thanks!
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
