Articles & Information.

Performance and Scaling Tips

Select a topic:

Choose from one of the topics below to browse other articles

Last updated by Rudolph Keown on September 02, 2013 15:07

These tips are designed to let your Mxit app perform even faster, and give you advice from other developers about how to best scale to meet the traffic of Mxit's millions of users.


Use a Load Testing Service

Since Mxit can bring a large amount of traffic in a relatively small amount of time, you'll want to use a load testing service like Blitz.io to make sure your app can scale to meet a large load of traffic.

Since Mxit has a Web Gateway system that proxies this traffic between the individual users running Mxit and your application server, you should be ready to have this traffic come through a relatively small number of IP addresses. (Some load balancers don't handle this well, so you'll want to test this before running a high-traffic promotion like a Tradepost message.)


Set Nocache Header

When displaying dynamic content, you'll want to set the "no-cache" header, otherwise your content may be cached by Mxit's web gateway.


Turn on HTTP keepalive

HTTP 1.1 has a mode that allows a connection to be kept open and multiple requests to be serviced on the same connection.   This is in contrast to the normal http connection model of one request and response per connection made.  Sometimes called pipelining.


Enable gzip or deflate HTTP compression

The Mxit Web Gateway supports compression.  The standard Accept-Encoding HTTP header can be used to determine what types are supported.  This is usually automatically determined by your web server.  


Reduce page size and number of images

Smaller pages make for faster pages, which means less to download and less for the Mxit client to process.

You can reduce your page size by removing unnecessary comments, whitespace, newlines, tabs, and so forth.


Move Image Fetching from the server to the client

Mxit Clients can fetch images from the user’s handset directly rather than from the same MXit Server that fetches the page for transcoding.   Inline image (data fetched and sent in the message to the user) is the default and can be changed to use handset fetched images with the following meta tag:

<meta name="mxit" content="no_inline_images"/>

Advantages: It makes the user experience faster because the content can be seen before the images are transferred.  Images are also cached on the client if they are the same url.

Disadvantages: some devices might prompt for each image requested if not cached.


Optimizing Your Images

Images can be resized on your server side according to the size of the user’s screen which is sent via the UA-Pixels header.

PNG preferred, then JPEG.  No GIFs because GIFs do not have 100% support on all devices.

Find ways to present the least number of images - e.g. only show it once per user’s session.

Width and height different to the actual size of the image is not recommended - prefer serverside reduction in size of images.


General Performance Tips

Have a look at Yahoo's essential Performance Guidelines for more information and tips.  Most of them relate to client side rendering, so not all of them apply to optimizing Mxit apps.