Sunday, April 15, 2018

Throttling in OSB 11g - with Work Managers

There are few legacy systems which will not be able to handle too much of load simultaneously. In that cases we need to throttle our system not to send too much requests in parallel.

In OSB, we have 2 different approach to handle this situation.
1. Enable Throttling in Business service.
2. Use custom work manager in Proxy Service.

Throttling in Business Service:

We have an Out-of-box configuration in Business service, where you can just enable the throttling by just check box and configure the values.

But its not available in during the design time, so once the code is deployed to sbconsole. Please follow the below steps to configure the same.

1. Login to Sbconsole.
2. Go to Project Explorer and select the Business service you want to throttle.
3. Select Operational Settings tab.
4. In this tab, under Throttling, select the Enable check box.

  • Maximum Concurrency - Number of parallel request to that service.
  • Throttling Queue - to backlog messages that has exceeded the message concurrency limit
  • Message Expiration - Specify the number of milliseconds that a message can spend in Throttling Queue. The message will be erased after specified time. (It is a optional field) If the message expiration is set to "0" , the message will never expire.














Note: The Queue is a cache memory, so if the server crashes or restarts the messages stored in Throttling queue will be lost.

Throttling Using Proxy service: 

So the Better the option to handle throttling will be work managers along with Proxy Service.
Follow the below steps to create work manager,

1. Login to Console.
2. Select Work Managers.


3. Click on New.
 4. Select Work Manager.
 5. Name the Work Manager and select the targeted server.
 6. Now Click on the Custom Work Manger you have created.
 7. Select "New" on Maximum Thread constraint.
 8. Specify the number of thread you wish to use.
9. Now Activate the session.
 10. Login to Sbconsole and navigate to the Proxy Service.

11. Select the "dispatch-policy" under HTTP Transport Configuration and activate the session.

Note: In this case, the throttling will happen at the proxy service layer itself. So there wont be any message loss.


No comments:

Post a Comment