Serving Direct Update requests from a CDN

You can configure Direct Update requests to be served from a CDN (content delivery network) instead of from the MobileFirst Server.

Advantages of using a CDN

Using a CDN instead of the MobileFirst Server to serve Direct Update requests has the following advantages:

General requirements

To serve Direct Update requests from a CDN, ensure that your configuration conforms to the following conditions:

Example configuration

This example is based on using an Akamai CDN configuration that caches the Direct Update archive. The following tasks are completed by the network administrator, the MobileFirst administrator, and the Akamai administrator:

Network administrator
  1. Create another domain in the DNS for your MobileFirst Server. For example, if your server domain is yourcompany.com you need to create an additional domain such as cdn.yourcompany.com.
  2. In the DNS for the new cdn.yourcompany.com domain, set a CNAME to the domain name that is provided by Akamai. For example, yourcompany.com.akamai.net.
MobileFirst administrator
Set the new cdn.yourcompany.com domain as the MobileFirst Server URL for the MobileFirst applications. For example, for the Ant builder task, the property is: <property name="wl.server" value="http://cdn.yourcompany.com/${contextPath}/"/>
Akamai administrator
  1. Open the Akamai property manager and set the property host name to the value of the new domain.
    Akamai screen image of property host name value
  2. On the Default Rule tab, configure the original MobileFirst Server host and port, and set the Custom Forward Host Header value to the newly created domain.
    Akamai screen image of origin server settings
  3. From the Caching Option list, select No Store.
    Akamai screen image of caching settings
  4. From the Static Content configuration tab, configure the matching criteria according to the Direct Update URL of the application. For example, create a condition that states If Path matches one of direct_update_URL.
    Akamai screen image of condition settings for triggering a Direct Update request
  5. Set values similar to the following values to configure the caching behavior to make cache the Direct Update URL and to set TTL.
    Table 1. Configuring caching
    Field Value
    Caching Option Cache
    Force Revaluation of Stale Objects Serve stale if unable to validate
    Max-age 3 minutes
    Akamai screen image of cache behavior settings
  6. Configure the cache key behavior to use all request parameters in the cache key (you must do so to cache different Direct Update archives for different applications or versions). For example, from the Behavior list, select Include all parameters (preserve order from request).
    Akamai screen image of cache key behavior
  7. Save and activate the configuration.