Deploy multiple traffic managers with fail over data publisher fail over data receiver pattern.


Like we discussed early gateway data receiver need to configure with fail over data receiver. But data publisher can be configured according to load balance or failover pattern. In this section we will see how we can publish throttling events to traffic manager in failover pattern.

Failover configuration

s8YuuoU022qL8M0comFZBpA.png

When using the failover configuration in publishing events to Traffic manager, events are sent to multiple Traffic Manager receivers in a sequential order based on priority. You can specify multiple Traffic Manager receivers so that events can be sent to the next server in the sequence in a situation where they were not successfully sent to the first server. In the scenario depicted in the above image, first events are sent to Traffic Manager Receiver-1. If it is unavailable, then events will be sent to Traffic Manager Receiver-2. Further, if that is also available, then events will be sent to Traffic Manager Receiver-3.


 <DataPublisher>
           <Enabled>true</Enabled>
           <Type>Binary</Type>
           <ReceiverUrlGroup>tcp://127.0.0.1:9612 | tcp://127.0.0.1:9613</ReceiverUrlGroup>
           <!--ReceiverUrlGroup>tcp://${carbon.local.ip}:9612</ReceiverUrlGroup-->
           <AuthUrlGroup>ssl://127.0.0.1:9712 | ssl://127.0.0.1:9713</AuthUrlGroup>
           <!--AuthUrlGroup>ssl://${carbon.local.ip}:9712</AuthUrlGroup-->
           <Username>${admin.username}</Username>
           <Password>${admin.password}</Password>
           <DataPublisherPool>
               <MaxIdle>1000</MaxIdle>
               <InitIdleCapacity>200</InitIdleCapacity>
           </DataPublisherPool>
           <DataPublisherThreadPool>
               <CorePoolSize>200</CorePoolSize>
               <MaxmimumPoolSize>1000</MaxmimumPoolSize>
               <KeepAliveTime>200</KeepAliveTime>
           </DataPublisherThreadPool>
       </DataPublisher>
          
<JMSConnectionParameters>              
<transport.jms.ConnectionFactoryJNDIName>TopicConnectionFactory</transport.jms.ConnectionFactoryJNDIName>
<transport.jms.DestinationType>topic</transport.jms.DestinationType>           
<java.naming.factory.initial>org.wso2.andes.jndi.PropertiesFileInitialContextFactory</java.naming.factory.initial>            
<connectionfactory.TopicConnectionFactory>amqp://admin:admin@clientID/carbon?failover='roundrobin'%26cyclecount='2'%26brokerlist='tcp://127.0.0.1:5673?
retries='5'%26connectdelay='50';tcp://127.0.0.1:5674?
retries='5'%26connectdelay='50''</connectionfactory.TopicConnectionFactory>
</JMSConnectionParameters>

2 comments:

  1. Hello Sanjeewa Malalgoda, Good info!!
    However I have few additional questions.
    (1) The above description covers only the initial configurations, how about other settings, is it same?
    (2) It seems there is relevant configuration in PolicyDeployer too, how to do configuration for balancing or fail-over for the same?
    (3) What is the role of DataPublisher, JMS and PolicyDeployer?
    (4) Is it OK to configure DataPublisher in load balancing and JMS in failover?

    ReplyDelete
    Replies
    1. (1) The above description covers only the initial configurations, how about other settings, is it same?
      Yes other distributed deployment specific configurations will apply in same way. I'm working on complete article these days and it will be available soon(explaining how to do complete deployment).

      (2) It seems there is relevant configuration in PolicyDeployer too, how to do configuration for balancing or fail-over for the same?
      Usually policy deployed to one master node and other nodes need to synch up with them. Please refer diagram in this post(http://sanjeewamalalgoda.blogspot.com/2016/09/failover-throttle-data-receiver-pattern.html) It explains more information.

      (3) What is the role of DataPublisher, JMS and PolicyDeployer?
      Data publishing component will reside within gateway and push events to traffic manager.
      Policy deployer will be used to create and deploy dynamic policies.

      (4) Is it OK to configure DataPublisher in load balancing and JMS in failover?
      Yes that is fine. Then when we publish events it will go to one of the traffic manager. Then from internal communications both traffic managers are having updated decisions. So fail over JMS connection works because it can fetch updates from any nodes.It will be combination of these 2 patterns(1.http://sanjeewamalalgoda.blogspot.com/2016/08/deploy-multiple-traffic-managers-with_68.html, 2.http://sanjeewamalalgoda.blogspot.com/2016/09/failover-throttle-data-receiver-pattern.html).

      Hope this helps you.

      Thanks,
      sanjeewa.

      Delete

Empowering the Future of API Management: Unveiling the Journey of WSO2 API Platform for Kubernetes (APK) Project and the Anticipated Alpha Release

  Introduction In the ever-evolving realm of API management, our journey embarked on the APK project eight months ago, and now, with great a...