On Fri, Apr 1, 2016 at 6:05 PM, Sanjeewa Malalgoda <[email protected]> wrote:
> Hi All, > Hi Sanjeewa, > While working on new throttling implementation for API Manager we wanted > to add some additional configurations to product. > The intention of this mail is discuss about them and come to conclusion. > > So far we had simple throttling design and we did not wanted to connect > with other components while making throttling decision(as it was local > counter). > But with new implementation we need to make few connections while server > startup and running. For them and to store other configurations we need to > have following configuration parameters. > > - At server startup(if this is newly spawned instance) we need to get > all throttled events from central policy server. For this we have already > implemented JAX-RS based REST web service which we can deploy on central > policy server. This web service need to be secured with basic auth and > should only allowed admin calls. This server to server communication do not > need any information related to tenants or user.For this we need to have > following parameters at gateway side. Refer connection 01 in attached > image[1] > > 01. throttle event service URL. > 02. Admin user name. > 03. Admin password. > 04. If we fetch batched results then we need to pass batch size > and offset(as of now haven't implemented this). > I think we should avoid getting all throttled events as we discussed earlier and only get some portions (or fixed no of entries).. Then by allowing to send throttle event trigger to topic for each throttling situation again and again, new node can get an update.. > > - When server startup gateway need to subscribe to topic registered > and central policy server (or other component communicate with central > policy server). For this we need to have JMS connection details. Refer > connection 02 in attached image[1]. To make that connection we need > following configuration. > > 01 JMS connection URL+ Topic name. > 02 User Name. > 03 Password. > 04. Some transport specific properties. > > - When we display tiers and let users to use tiers we need to limit > visibility of unlimited tier. For this now we have > configuration(EnableUnlimitedTier) in api-manager.xml configuration file. > We need to have configuration for this as well. > > > - Also we need to have configuration to enable new throttling > implementation. > > > - Important thing here is once users enabled new throttling feature, > user interface and throttle handler in synapse configuration will be > changed. > - If users need to move current throttling data to new throttling > engine there will be data migration. > - Once users switched to new throttling implementation they cannot > simply revert back to old throttling implementation. > - And at a given time we cannot support both new and old throttling > features from UI level(but runtime can handle it). > - If users are still willing to use old throttling handlers(runtime) > they can keep it(handlers in configuration) as it is. > - But user interfaces will be show new throttling data and handlers > remain unchanged. > > > - > > If throttle data source maintained as separate data source then that > data source name also should be in configuration. > > Other than that, we need to have some jms tuning parameters (Thread pool, timeout values and etc) as well.. > > So all together i would like to suggest to add following configuration to > API Manager configuration file. > This is not mandatory configuration and if this configuration was not > there then system will run with old throttling implementation. > > <ThrottlingConfigurations> > <EnableGlobalCEPThrottling>false</EnableGlobalCEPThrottling> > <EnableUnlimitedTier>true</EnableUnlimitedTier> > <ThrottleDataSourceName>jdbc/WSO2AM_DB</ThrottleDataSourceName> > <GlobalPolicyEngineWSConnectionDetails> > <ServiceURL>http://127.0.0.1:9763/throttledata/service > </ServiceURL> > <UserName>admin</UserName> > <Password>admin</Password> > </GlobalPolicyEngineWSConnectionDetails> > <JMSConnectionDetails> > <ServiceURL>tcp://127.0.0.1:52556</ServiceURL> > <UserName>admin</UserName> > <Password>admin</Password> > <JMSConnectionParameters> > <PropertyName1>PropertyValue1</PropertyName1> > <PropertyName2>PropertyValue2</PropertyName2> > </JMSConnectionParameters> > </JMSConnectionDetails> > <ThrottlingConfigurations> > > Thanks, Mohan > > [01]Image > > > > Please review this and let us know your feedback. > > > Thanks, > sanjeewa. > > > -- > > *Sanjeewa Malalgoda* > WSO2 Inc. > Mobile : +94713068779 > > <http://sanjeewamalalgoda.blogspot.com/>blog > :http://sanjeewamalalgoda.blogspot.com/ > <http://sanjeewamalalgoda.blogspot.com/> > > > -- *V. Mohanadarshan* *Senior Software Engineer,* *Data Technologies Team,* *WSO2, Inc. http://wso2.com <http://wso2.com> * *lean.enterprise.middleware.* email: [email protected] phone:(+94) 771117673
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
