Before I get to the speed/performance issue that I want to highlight, I’ll review some of the basics of 2-way SMS in NowSMS and provide a few starter links for beginners who might have stumbled upon this post.
The 2-way SMS facility of NowSMS is designed to facilitate the processing of inbound, or mobile originated, SMS messages.
When NowSMS receives an SMS message, it will evaluate the content of the message, and can either execute a program, or connect to an HTTP URL (such as a PHP, Perl or ASP script), passing the content of the received message to program or script.
The basics of 2-way SMS are described in the NowSMS manual and at the following link:
http://www.nowsms.com/doc/2-way-sms-support
A good basic troubleshooting guide for initially setting up 2-way SMS can be found at the following link: http://www.nowsms.com/discus/messages/1/4520.html
The above link also has some simple PHP and ASP examples for processing received SMS messages.
If you are processing more than 10 inbound SMS messages per second, it may be necessary to configure NowSMS to allocate more threads for the 2-way command processing, depending on the speed of your 2-way command script.
NowSMS will receive messages from the SMSC connection as quickly as it can, so that messages do not backup at the service provider.
After receiving the SMS messages from the service provider, NowSMS queues the received messages, and a separate thread within NowSMS evaluates the received messages and processes the 2-way commands, so other gateway activity of sending and receiving messages can continue while the 2-way commands are being processed.
The program thread that processes the 2-way commands processes only one message callback at a time, waiting for current 2-way command to complete before processing the next message.
If your 2-way command script is running on a web server on the same local network, and is reasonably quick in its processing, NowSMS can process approximately 100 messages per second for HTTP-based 2-way commands in ideal situations. However, not all configurations are ideal, and in typical configurations, NowSMS spends more time waiting for the 2-way command to complete than in the actual processing of the message. This waiting for the 2-way command has a significant impact on 2-way command message throughput.
It is possible to configure NowSMS to allocate more 2-way command processing threads to provide higher throughput by editing SMSGW.INI, and under the [SMSGW] section header, adding 2WaySMSThreadCount=## … where ## is the number of threads to allocate.
In future versions of NowSMS, we will be enabling the use of HTTP keep-alive sockets, which our tests have shown can increase single threaded “ideal” throughput to a range of 175 to 200 messages per second processed by a single 2-way command. While that will offer some performance boost, typical configurations are not limited by the speed at which NowSMS processes 2-way commands, but rather by the speed at which actual 2-way command scripts perform their processing logic. For those typical configurations, allocating multiple 2-way command processing threads can offer a performance boost.
Related pages:
- Routing SMS Messages to E-Mail NowSMS can be configured to route received SMS messages to an e-mail address. This configuration is similar to the configuration...
- NowSMS Update Available for Test Release Over the past several months, we have been working on some optimisations and performance enhancements to the core SMS message...
- 2-Way SMS Returning a Non-Text Response It is a relatively simple process to define a 2-way command that returns a text response to the message sender....
- Sending WAP Push and Binary SMS from the Command Line In past postings, we’ve provided a variety of command line script examples that make it easy to interface with NowSMS...
- Introducing NowWAP 2009 NowMobile is proud to introduce the latest version of the NowWAP Proxy/Gateway, NowWAP 2009. We’d like to take this opportunity...
- NowSMS 2009 Now Available NowSMS 2009 is the fastest performance release of NowSMS to date. While we’ve added considerable new functionality, we’ve successfully avoided...
- SMS and MMS with the SonyEricsson MD300 or MD400 USB Modem The SonyEricsson MD300 USB Modem is a very good modem to use with NowSMS to send and receive SMS and...
- 2-Way SMS Support Automatic SMS Reply and More … The “2-Way” configuration dialog contains settings relevant to the creation of 2-way applications that...
- NowSMS in Fault Tolerant or Redundant Load Balanced Environment For many configurations it is desirable to install NowSMS on multiple servers in order to achieve fault tolerance and/or improved...
- Introducing NowSMS Lite The Now SMS & MMS Gateway is one of the most widely used middleware software solutions for SMS, MMS and...
Topic Category: 2-way SMS, mobile originated
For comments and further discussion, please click here to visit the NowSMS Technical Forums (Discussion Board)...

Click here to download a free trial version of NowSMS & MMS Gateway, NowSMS Lite or NowWAP Gateway.
Learn more about NowSMS Lite.