Per-Publication Throttling

By default, the same throttle controls access to all publications. It may be, however, that you want to isolate the publications from one another, so that a traffic spike on one publication does not affect the performance of other publications. You can do this by defining additional throttle service components like the default /neo/io/services/JspThrottleService component. You can then:

  • Configure different publications to use different throttle services.

  • Set the maximumConcurrent property individually for each publication.

Note that doing this does not increase the total capacity of the server. If maximumConcurrent was already set to its optimum value in a single throttle set-up, then this number of concurrent requests must be shared out between the throttle services in the new set-up.

To set up additional throttle services:

  1. Create a .properties file for each throttle service you want to create in one of your configuration layers. You might, for example, create a file called configuration-layer-root/throttles/MyThrottle.properties:

  2. Add the following class definition.

    $class=neo.util.ResourceThrottle
  3. Add the additional property settings you require. For example:

    maximumConcurrent=5
  4. Since you've added new throttle services, you will probably need to reduce the maximumConcurrent setting of the default throttle service (/neo/io/services/JspThrottleService) accordingly. To do this, edit configuration-layer-root/neo/io/services/JspThrottleService.properties. (You may need to create this file if it does not already exist in the configuration layer.)

  5. For every publication web application that is to use the new throttle service, you must edit the WEB-INF/web.xml file. Open the file, find the ECETimerFilter definition and add a new parameter definition as a child of the init-param element:

    <init-param>
      <param-name>throttle</param-name>
      <param-value>/throttles/MyThrottle</param-value>
    </init-param>

    The throttle parameter must be set to the name of the new throttle service (/throttles/MyThrottle in this case).