Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
6 replies Latest Post - ‏2011-08-30T13:12:44Z by rsb_113
rsb_113
rsb_113
4 Posts
ACCEPTED ANSWER

Pinned topic Routing to 2 endpoints

‏2011-08-25T08:43:31Z |
Hi,

Was looking for a bit of advice, i've got a WS-Proxy, with one endpoint defined. What I want to do is, if that endpoint is un-reachable (ie a specefic error is returned) then i'd want to route to an alternative endpoint. Is this possible from the WS-Proxy?

Thanks
Updated on 2011-08-30T13:12:44Z at 2011-08-30T13:12:44Z by rsb_113
  • afrog
    afrog
    48 Posts
    ACCEPTED ANSWER

    Re: Routing to 2 endpoints

    ‏2011-08-25T14:08:10Z  in response to rsb_113
    Assuming that the url paths are the same, create a load balancer group and use this in place of the host:port.
  • JBrennan
    JBrennan
    77 Posts
    ACCEPTED ANSWER

    Re: Routing to 2 endpoints

    ‏2011-08-25T14:43:19Z  in response to rsb_113
    A load balancer group would work if the primary endpoint is truly unreachable. If you are looking for trying a secondary endpoint in the event of some HTTP response code or some other error, you would best implement this in a error rule.
    • Mike.L
      Mike.L
      15 Posts
      ACCEPTED ANSWER

      Re: Routing to 2 endpoints

      ‏2011-08-25T14:56:06Z  in response to JBrennan
      Depends on what is your requirements. if you are calling some back end services, url-open such kind method will help u to have full control your process. Load balancer will be the easiest and cheap way to increase the availability but can not contain any logic.
  • rsb_113
    rsb_113
    4 Posts
    ACCEPTED ANSWER

    Re: Routing to 2 endpoints

    ‏2011-08-26T08:22:20Z  in response to rsb_113
    Thanks for that, I haven't done much work with the load balancer group - not sure of its capabilities, will do some reseach into that.

    The requirement is to always send to the primary endpoint, after consecutive
    errors (whic are recieved when the primary is unavalible), the endpoint should switch to the secondary one and then stay at
    that until we receive further notice that the primary is back up.

    Does the load balancer group work by just sending to which ever endpoint is avaliable? The problem is we don't know which endpoint is avalible until a request is sent and we receive a response.
    • SystemAdmin
      SystemAdmin
      6772 Posts
      ACCEPTED ANSWER

      Re: Routing to 2 endpoints

      ‏2011-08-26T09:55:21Z  in response to rsb_113
      The load balancer group has a "healthcheck" feature.

      If your webservice has a suitable operation, the Load Balancer can send that request periodically and apply a predefined XPATH to validate the response.

      This is probably the easiest and safest way to prove that an endpoint works.

      Using custom error rules you can implement any error-retry logic but I would avoid complexity if possible.

      Be sure to clearly qualify the requirements with the customer.
  • rsb_113
    rsb_113
    4 Posts
    ACCEPTED ANSWER

    Re: Routing to 2 endpoints

    ‏2011-08-30T13:12:44Z  in response to rsb_113
    we ended up implementing the load balancer group option over the weekend, as muliple endpoints were given. Working as expected for now, cheers