• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

Managing concurrent processing of a particular service in a webapp

Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

Sorry if this isnt the right subforum.
I need some direction on an approach for a design.
I have 2 tomcat servers which hosts 2 instances of an app facing users. This app communicates with multiple(3 or 4) tomcat instances of a webservices app hosted on some other servers using SOAP & URLConnection(filestream) for data. Requests to the tomcat instances are handled by a load balancer.
One of the servlets in the external userfacing app is frequently used by users. This servlet when executes actually opens a URLConnection to a service hosted on the webservices app to get the stream of data.This particular service hits DB to get the data. Around 20 DB conn in a pool.

Due to the heavy load,outofmemory server crashes sometimes (DB conn being not available etc), I am planning to restrict no of concurrent requests this particular 'Servlet App => URLConnection => WebService App' service and queue up requests to an extent.

I need advice on the best way this can be achieved. What kind of a mechanism can be implemented?Which app should be considered for setting up restriction considering the load balancers/multiple instances?
Is ThreadPoolExecutor in Java 5 a good choice for this design?

Thanks in Advance
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic