Go to new doc!

+49 228 5552576-0


info@predic8.com

throttle

The throttle feature can slow down traffic to thwart denial of service attacks.

Can be used in

proxy, serviceProxy, soapProxy, transport

Syntax

				<throttle delay="long"
							 maxThreads="int"
							 busyDelay="long"
				/>
			
Listing 1: throttle Syntax

Sample

This sample delays every request for a second and limits the number of concurrent clients to five. After 3 seconds of waiting a client gets a timeout if there are no threads left to serve its request.

				<serviceProxy port="2000">
					<throttle delay="1000" maxThreads="5" busyDelay="3000"/>
					<target host="www.predic8.de" />
				</serviceProxy>
			
Listing 2: throttle example

Attributes

Name Mandatory Default Description Example
delay no 0 If not 0, delays requests by specified number of milliseconds. 1000
maxThreads no 0 If not 0, request are aborted if the thread count reaches this limit. 5
busyDelay no 0 If the maxThreads limit is reached, the interceptor waits the specified number in milliseconds before the request is aborted. 3000