Hi All,
Here are the List of configuration which we introduce in api-manager.xml
for new Throttling Implementation. From this implementation we can
configure below elements .
<ThrottlingConfigurations>
<EnableAdvanceThrottling>true</EnableAdvanceThrottling>
<DataPublisher>
<Type>Binary</Type>
<ReceiverUrlGroup>tcp://localhost:9611</ReceiverUrlGroup>
<AuthUrlGroup>ssl://localhost:9711</AuthUrlGroup>
<Username>admin</Username>
<Password>admin</Password>
<DataPublisherPool>
<MaxIdle>1000</MaxIdle>
<InitIdleCapacity>200</InitIdleCapacity>
</DataPublisherPool>
<DataPublisherThreadPool>
<CorePoolSize>1000</CorePoolSize>
<MaxmimumPoolSize>200</MaxmimumPoolSize>
<KeepAliveTime>200</KeepAliveTime>
</DataPublisherThreadPool>
</DataPublisher>
<PolicyDeployer>
<ServiceURL>https://localhost:9443/services/</ServiceURL>
<Username>admin</Username>
<Password>admin</Password>
</PolicyDeployer>
<BlockCondition>
<ServiceURL>http://localhost:9763/throttle/data/v1/block</ServiceURL>
<Username>admin</Username>
<Password>admin</Password>
<!--InitDelay>300000</InitDelay>
<Period>3600000</Period-->
</BlockCondition>
<GlobalPolicyEngineWSConnectionDetails>
<ServiceURL>http://localhost:9763/throttle/data/v1/throttleAsString
</ServiceURL>
<Username>admin</Username>
<Password>admin</Password>
<!--InitDelay>300000</InitDelay-->
</GlobalPolicyEngineWSConnectionDetails>
<JMSConnectionDetails>
<!--ServiceURL>tcp://127.0.0.1:52556</ServiceURL>
<Username>admin</Username>
<Password>admin</Password>
<Destination>throttleData</Destination>
<InitDelay>300000</InitDelay-->
<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?brokerlist='tcp://localhost:5672'</connectionfactory.TopicConnectionFactory>
</JMSConnectionParameters>
<JMSTaskManager>
<MinThreadPoolSize>100</MinThreadPoolSize>
<MaxThreadPoolSize>20</MaxThreadPoolSize>
<KeepAliveTimeInMillis>1000</KeepAliveTimeInMillis>
<JobQueueSize>10</JobQueueSize>
</JMSTaskManager>
</JMSConnectionDetails>
<EnableUnlimitedTier>true</EnableUnlimitedTier>
<EnableSubscriptionSpikeArrest>false</EnableSubscriptionSpikeArrest>
</ThrottlingConfigurations>
*EnableAdvanceThrottling* - State the advance throttling is enable.
*DataPublisher* - Configure the global Throttling engine configuration.
*PolicyDeployer* - Configure the Policy Deploy engine Service
Url,username,password
*BlockCondition* - Web service configuration for Block Condition retriever
API
*GlobalPolicyEngineWSConnectionDetails* - Web service configuration for
retrieving Throttle Events.
*JMSConnectionDetails* - Jms Connection details
*EnableUnlimitedTier* - This will state if unlimited tier is enable.
*EnableSubscriptionSpikeArrest* - This will state the subscription base
Spike arrest is enabled.
Please review this and let us know your feedback.
Thanks
Tharindu
On Thu, Apr 7, 2016 at 3:01 PM, Sanjeewa Malalgoda <[email protected]>
wrote:
> Hi All,
> 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).
>
> - 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.
>
>
> 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>
>
>
> [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/>
>
>
>
>
>
> --
>
> *Sanjeewa Malalgoda*
> WSO2 Inc.
> Mobile : +94713068779
>
> <http://sanjeewamalalgoda.blogspot.com/>blog
> :http://sanjeewamalalgoda.blogspot.com/
> <http://sanjeewamalalgoda.blogspot.com/>
>
>
>
> _______________________________________________
> Architecture mailing list
> [email protected]
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>
--
*Tharindu Dharmarathna*Associate Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware
mobile: *+94779109091*
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture