8/22/2014
Thr ottli ng i n OSB ( Knut Vatsendvi k' s Bl og )
Throttling in OSB By Knut Vatsendvik on Apr 28, 2010
Technorati Tags: so a ,integration, integration,osb os b ,throttling, throttling ,overload protection A com m on problem probl em w ith integration is the risk of overload overload ing a particular particula r web se rv rvice. ice. When the capacity of a web service is reached and it continues to accept connections, connections, it will most likely start start to deteriorate.
Fortunately there are 2 techniques, with Oracle Service Bus, that you can apply for protecting this from happening. You can either limit the concurrent numbe r of requests for a Busines s Service Service (outbound requests) or you can limit the number of threads proces sin g the reques ts for a Proxy Serv Service ice (inbound requests).
Limi Li miting ting the Concurre nt Number Number of Reque sts Limiting Limit ing the concurrent re quests for a Busines s Service Service cannot be set at design time s o you you have have to use the built-in Oracle Service Servi ce Bus Adminis trat tratii on Cons ole to do it (/sbconsole (/sbconsole ). Follow Follow these s teps to enable it: 1. In Change Center Center , click Create Create to to start a new Sess ion 2. Select Proje Project ct Explorer , Explorer , and navigate navigate to the Bus iness Serv Service ice you want to limi t 3. Select the Operational Settings tab of the View a Bu Business siness Service page 4. In this tab, u nder Throttling Throttling,, select the Enable Enable check check box. b ox. By enab enabling ling throttling you a. Specify a value value for Maximum Co Concurrency ncurrency b. Specify a positive pos itive integer value value for Throttling Queue to backlog backlog m ess ages that has exceeded exceeded the message concurrency limit c. Specify the maximum time in millis econds for Message Expiration a Expiration a mess age can spend in Throttling Queue 5. Click Update 6. Click Ac Active tive in in Ch Change ange Center to to active active the new se settings ttings
https://blog s.or acle.com/knutvatsendvik/entr y/thr ottl i ng _i n_osb
1/5
8/22/2014
Throttling in OSB (Knut Vatsendvik's Blog)
If you re-publis h the s ervice, it will n ot overwrite the settings. Only if the res ource is renamed or m oved, it will. Please n ote that a throttling queue is an in-me mory queue. Mess ages that are placed in this queue are not recoverable when a server fails or when you restart a server.
Limiting the Number of Threads A better approach, in m y opinion, is to lim it the number of threads that can work with reques t. Follow thes e steps to do it: 1. Open the WebLogic Server Console (/console) 2. In Change Center , click Create to start a new Sess ion 3. In the left pane expand Environment and sel ect Work Managers
4. In the Global Work Managers page, click New
5. Click the Work Manager radio button, then click Next
https://blogs.oracle.com/knutvatsendvik/entry/throttling_in_osb
2/5
8/22/2014
Throttling in OSB (Knut Vatsendvik's Blog)
6. Enter a Name for the new Work Manager, and click Next 7. In the Available Targets lis t, sele ct server instances or clusters on which you will de ploy applications that reference the Work Manager 8. Click Finish. The new Work Manager now ap pears i n the Global Work Managers page. 9. Select the new Work Manager 10. Right next to the Maximum Threads Constraint drop-down box, click New
11. Click the Maximum Threads Constraint radio button, then click Next
https://blogs.oracle.com/knutvatsendvik/entry/throttling_in_osb
3/5
8/22/2014
Throttling in OSB (Knut Vatsendvik's Blog)
12. Enter a Name and a thread Count to be the maximum size to allocate for requests. Click Next
13. In the Available Targets lis t, sele ct server instances or clusters on which you will de ploy applications that reference the Work Manager 14. Click Finish 15. Click Save 16. Click Active in Change Center to active your changes. A restart may be neces sa ry. Puh! Almost there. 17. Start a new se ss ion. Go to the Service Bus Cons ole (/sbcons ole) and find your consum ing Proxy Service. 18. Click the Edit button of the Transport Configuration tab. 19. Click Next
https://blogs.oracle.com/knutvatsendvik/entry/throttling_in_osb
4/5
8/22/2014
Throttling in OSB (Knut Vatsendvik's Blog)
20. Set the Dispatch Policy to the new Work Manager
21. Click Last 22. Click Save 23. Click Active in Change Center to active your changes .
https://blogs.oracle.com/knutvatsendvik/entry/throttling_in_osb
5/5