Just thinking out loud, is there by any chance a possibility to run just 1 forever for any number of policies? Even if that means a redesign of the policies?
On Thu, Mar 14, 2019 at 3:48 PM Rajith Roshan <raji...@wso2.com> wrote: > > > On Thu, Mar 14, 2019 at 3:21 PM Nuwan Dias <nuw...@wso2.com> wrote: > >> >> >> On Thu, Mar 14, 2019 at 3:20 PM Rajith Roshan <raji...@wso2.com> wrote: >> >>> >>> >>> On Thu, Mar 14, 2019 at 2:32 PM Nuwan Dias <nuw...@wso2.com> wrote: >>> >>>> What about the developer first approach? In that case we pre load the >>>> default policies to the gateway anyway since there is no indication of an >>>> API being associated to a subs throttling policy. >>>> >>> I wonder in current implementation also how these subscription policies >>> are used. Since with developer first approach any way are not using oauth2 >>> , I assume we are not using any of the subscription policies , @Arshardh >>> Ifthikar <arsha...@wso2.com> please correct me if I am wrong >>> >> >> I believe we honor the tier that comes along with the JWT (if it does). >> > Yes, For developer first approach we can ship the by default available > policies. In the other approach we can limit the policies we are adding to > micro gw. Because in APIM side there can be many subscription policies but > not used in APIs which is exposed via micro-gw > >> >>>> On Thu, Mar 14, 2019 at 2:23 PM Rajith Roshan <raji...@wso2.com> wrote: >>>> >>>>> Hi all, >>>>> Currently in microgateway(MGW) when we create the project directory we >>>>> fetch all the subscription and application policies and we generate the >>>>> source for each policy. In each policy there is ever running loop >>>>> (forever), in back ground to update the throttle counters. But the issue >>>>> some of the subscription policies(tiers) might not be used in any of the >>>>> APIS in MGW and these not used policies running in the background might be >>>>> consuming some CPU cycles >>>>> >>>>> So we thought of filter out the subscription policies(tiers) which are >>>>> attached to any of the APIs exposed via MGW. >>>>> For ex if API Foo is attach with policy 100PerMin and API Bar is >>>>> attached with policies 75PerMin and 50PerMin , then if we are only >>>>> exposing >>>>> API "Foo" and "Bar" from MGW we will only create source files for those >>>>> subscription policies only, even though there are many subscription >>>>> policies defined in the admin portal of APIM. >>>>> Do you find any issues with this approach >>>>> >>>>> -- >>>>> *Rajith Roshan* | Associate Technical Lead | WSO2 Inc. >>>>> (m) +94-717-064-214 | (e) raji...@wso2.com <shen...@wso2.com> >>>>> >>>>> <https://wso2.com/signature> >>>>> >>>> >>>> >>>> -- >>>> *Nuwan Dias* | Director | WSO2 Inc. >>>> (m) +94 777 775 729 | (e) nuw...@wso2.com >>>> [image: Signature.jpg] >>>> >>> >>> >>> -- >>> *Rajith Roshan* | Associate Technical Lead | WSO2 Inc. >>> (m) +94-717-064-214 | (e) raji...@wso2.com <shen...@wso2.com> >>> >>> <https://wso2.com/signature> >>> >> >> >> -- >> *Nuwan Dias* | Director | WSO2 Inc. >> (m) +94 777 775 729 | (e) nuw...@wso2.com >> [image: Signature.jpg] >> > > > -- > *Rajith Roshan* | Associate Technical Lead | WSO2 Inc. > (m) +94-717-064-214 | (e) raji...@wso2.com <shen...@wso2.com> > > <https://wso2.com/signature> > -- *Nuwan Dias* | Director | WSO2 Inc. (m) +94 777 775 729 | (e) nuw...@wso2.com [image: Signature.jpg]
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev