SMSC Speed Limits

Posted by on Jun 26, 2008 in Support Blog

Topic Keywords: , , , ,

In a perfect world, we’d all be able to send SMS messages as fast as we wanted.

But the reality is that there is a combination of commercial and technical limitations throughout the message distribution chain.

NowSMS has commercial limitations where outbound message delivery is throttled at a per minute or per second license limit.

Individual SMS service providers have similar limits that they impose.

When you have a single SMS service provider connection, it is often easiest to match a NowSMS license limit with the license limit of your SMS service provider connection.

But sometimes this speed limit matching isn’t a perfect match.

For example, if your NowSMS system is connecting to multiple SMSC providers, NowSMS may try to send messages to one or more of your SMSC connections which exceeds the limit imposed by your SMS service provider.

What happens when you exceed the speed limit imposed by your SMS service provider?

It depends. There is no single answer, because there are a lot of different software implementations used by different SMS service providers.

In some cases, no problems occur. If the SMS service provider throttles back the speed at which it returns responses to NowSMS, NowSMS automatically slows down the connection to the speed desired by the service provider. (If you define an SMPP async window size that is too large, however, you may end up with retry errors and duplicate messages in this situation. A good rule of thumb is that the SMPP async window size should not exceed 2, or maybe 3, times the number of messages per second that the connection will accept.)

In other cases, the SMSC starts returning throttling errors, the dreaded ESME_RTHROTTLED. But throttling errors can occur for different reasons. They could also occur because the overall SMS system message queue is too large, and the provider needs all customers to slow down to give the system some time to catch up. By default, a throttling error causes NowSMS to have to retry the current message, and to wait 5 seconds before submitting the next message.

5 seconds is a long time to wait for sending the next message if you’re exceeding a 10 message per second limit. However, the default throttling delay of 5 seconds exists because when you’re connecting directly to a mobile operator, most of these mobile operators have acceptance testing procedures where they test your connection before allowing you to connect to their system. And one of the tests is always the handling of the throttling error, where historically they have wanted to see longer delays.

This throttle error delay can be adjusted by editing SMSGW.INI, and under the [SMSGW] section header, adding SMPPThrottleErrorDelay=##, where ## is a number of seconds to delay. SMPPThrottleErrorDelay=0 will remove any delay.

If you are receiving throttling errors, or possibly other error conditions, because you are exceeding the provider imposed speed limit of your SMSC connection, the best solution is to configure NowSMS to apply this speed limit to that particular SMSC connection.

It is possible to manually edit the SMSGW.INI file, and under the settings header for a particular SMSC connection (e.g., [SMPP – server:port]), use the following setting to define a speed limit for that connection only using the SMSCSendLimit=x/y setting.

The SMSCSendLimit=x/y setting can specify that the gateway will send no more than x
messages per y seconds. If y is not specified, then the default is 1. For example, to limit a
connection to 1 message every 5 seconds, specify SMSCSendLimit=1/5. To limit a
connection to 3 messages per second, specify SMSCSendLimit=3 or SMSCSendLimit=3/1.

In versions of NowSMS prior to v2008.06.03, this setting did not work very well for limits higher than around 50 messages per second. However, in more recent versions of NowSMS, this setting works well for speed limits higher than 50 messages per second.

While on the subject of SMSC speed limits, it is also worth mentioning that when NowSMS is used as an SMPP server, it can apply speed limits against the accounts that are submitting messages via SMPP (but not HTTP). When defining an “SMS Users” account, there is a setting to “Limit Speed of receiving messages for this account” which uses a similar “x messages / y seconds” type of definition.

It is also worth mentioning that this “SMS Users” account setting can also limit the number of SMPP connections that the client is allowed to make. Under the “SMPP Options” on the “Web” page of the NowSMS configuration, there is a system default limit for defining the maximum number of connections per individual client. However, this setting can be overridden on a per-account basis using the “Limit speed of receiving messages for this account” setting. In the “# Messages/# Seconds” field, enter a value of x/y/z, where “x” is the number of messages allowed per “y” seconds, and “z” is the connection limit to be applied for this account. To disable message speed limits, but define a connection limit, use a value of 0/0/z, which indicates no limits, but specifies “z” as the connection limit for this account.

For comments and further discussion, please click here to visit the NowSMS Technical Forums (Discussion Board)...