Hi Dushan,
Please find my comments inline.

On Thu, Oct 15, 2020 at 3:44 AM Dushan Abeyruwan <[email protected]> wrote:

>
>
> On Wed, Oct 14, 2020 at 4:03 AM Chamod Samarajeewa <[email protected]>
> wrote:
>
>> Hi all,
>>
>> In a multiple Traffic Manager(TM) setup of WSO2 APIM, the users have to
>> use a file-sharing system (NFS) to sync the throttle policies between TM
>> nodes. This is needed because during a creation/updating/removal of policy,
>> only a single TM will be called via an Admin service to deploy the
>> execution plan. In order to maintain the consistency between TM nodes, a
>> file-sharing mechanism is required in this case.
>>
>> To avoid the usage of a file-sharing approach, we are going to introduce
>> a new approach as below to synchronize the TM nodes.
>>
>> [image: throttle-policy-deployer.jpg]
>>
>>
>>    - Add a new JMS listener to the TM component to trigger on
>>    POLICY_CREATE, POLICY_UPDATE, POLICY_DELETE events (These events are
>>    already available for the purpose of Gateway functionalities)
>>    - Add/Edit the internal REST APIs to retrieve the policy metadata
>>    (sufficient enough to build the policy using the templates) from the
>>    database
>>    - Move the policy templates to the TM
>>    - Inside the newly added JMS listener, the internal REST APIs will be
>>    called to retrieve the policy metadata and use the policy templates to
>>    build the execution plan.
>>    - Then, the execution plan will be deployed calling the
>>    EventProcessorAdminService directly
>>
>>
>> This should be a good feature to have for TM HA deployments, IMO the
> approach is pretty much similar to how other event base improvements made
> at APIM 3.2.0.
> Anyway a few quick question;
>
>    1.  What is this internal *REST APIs (Event Hub)*? Is that something
>    to be part of the internal implementation of the APIM admin? or an external
>    component? if Internal EvenHub to be part of (Admin Node), you may have to
>    correct the scope, boundaries to represent this in a way to adhere to the
>    architectural representation.
>
> Internal REST API runs in Traffic manager node itself which has
connectivity to APIM Database. This API used to retrieve All the APIM
related information from Gateway from the Traffic manager.

>
>    1. Other than that, I would assume the existing PolicyDeployer
>    configuration (api-manager.xml), maybe deprecate with the internal
>    PolicyDeployer DB references, correct me if I'm wrong!
>
> From the next release Policy deployer configuration not used since the
default mode of deploying policies into Traffic manager used with the
event-based mechanism.

>
>    1. Also, with this change, *it would be mandatory to have DB sharing
>    between the Admin Node and the TM nodes*, isn't it? Or Admin node
>    pushes the policy changes with meta-data and the context to the EventHub
>    (internal representation in memory) then, JMSListners at TM pull this
>    information, what are failover situations?
>
> yes, Admin Node sends the Event Through topic to Traffic manager nodes.
Once the traffic manager receives the event it pulls from the internal rest
API with meta information. There was no need for having a failover
mechanism since the Admin node pushes the event to all TM nodes.

>
>    1. Will there be any potential changes with APIM Admin HA mode?
>
> No.

With the above-mentioned approach, file sharing will no longer be required
>> between TM nodes since the policy details are pulled from the database and
>> deployed upon a change to them.
>>
>> yes.

> Please share your thoughts. Thank you.
>>
>> Best regards,
>> Chamod.
>>
>> --
>> *Chamod Samarajeewa*
>> Software Engineer - WSO2
>>
>> Email - [email protected]
>> Mobile - +94710397382
>>
>>
>> _______________________________________________
>> Architecture mailing list
>> [email protected]
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>
>
> --
> Cheers,
> *Dushan Abeyruwan *| Solutions Architect | WSO2 Inc.
> (c) 408-987-1348 | (e) [email protected]
>
>

Thanks

*Tharindu Dharmarathna*Technical Lead
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: *+94779109091*
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to