Search
The Open Source SLEE and SIP Server

Mobicents Sip Servlets

Mobicents Sip Servlets Congestion Control

This page is obsolete : More detailed and better looking installation instructions are available from the Mobicents Sip Servlets User Guide

Description

Congestion control settings define the way messages are processed under heavy load and is often required in production environments.

Mobicents Sip Servlets currently defines 2 different congestion control mechanisms :

  • One based on the number of pending messages present in the queues. Indeed, the messages that can not be processed immediately will go in a queue to wait for a free thread or to wait for the lock on their sessions to be released, see Concurrency .  If this queue gets full the container will start rejecting any new SIP requests with either SIP error code 503 until the server catches up or drop any incoming messages depending of the congestion control policy chosen.
  • The other based upon the percentage of memory currently used by the container. If the memory used goes over a configurable threshold (90% per default), the container will start rejecting any new SIP requests with either SIP error code 503 until the server catches up or drop any incoming messages depending of the congestion control policy chosen.

A background task is running at regular intervals within Mobicents Sip Servlets to gather information about the current server congestion and the interval can be adjusted in the configuration (through the congestionControlCheckingInterval attribute in the server.xml, see below) or at run time (through the various management interfaces available, see below).
This background task can be stopped and congestion control deactivated by setting the interval to 0 or a negative value.\

Also the congestion control policy, what to do with an incoming message when the server is overloaded, is configurable and the possible values are :

  • DropMessage - drop any incoming message
  • ErrorResponse - send a 503 - Service Unavailable response to any incoming request (Default).

Configuration

You can configure the congestion control policy and settings in the following ways:

  • From server.xml in the Service tag you can add memoryThreshold, sipMessageQueueSize, congestionControlCheckingInterval, congestionControlPolicy attributes like this:

    <Service name="jboss.web" className="org.mobicents.servlet.sip.startup.SipStandardService" sipApplicationDispatcherClassName="org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl" sipApplicationRouterClassName="org.mobicents.servlet.sip.router.DefaultApplicationRouter" darConfigurationFileLocation="conf/dars/mobicents-dar.properties" congestionControlCheckingInterval="2000" congestionControlPolicy="DropMessage" memoryThreshold="80" sipMessageQueueSize="2000" >

    By default the congestion control checking interval is 30000 millisecs (3O seconds), queue size is 1500, the default memory threshold is 90% and the congestion control policy is ErrorResponse

  • From the Mobicents Sip Servlets Management Console . In the Server Settings tab.
  • From Embedded Jopr . You must first install Embedded Jopr in order this link to be accessible.
  • From the dispatcher MBean . You can navigate there from the JBoss jmx console. All changes performed at runtime are effective immediately, but are not persisted for the next reboot. If you want your changes to be permanent modify your server.xml file as described above. Remember, the allowed values are DropMessage and ErrorResponse.

Mobicents Sip Servlets