This tech note provides guidance on making the most effective use of the Instart web application delivery platform, in the form of a list of tips and tricks that we have found to be generally applicable to most websites. While performance can usually be further improved by careful analysis of your specific website and its content, these guidelines provide a starting point.
The system has been designed to deliver increased levels of performance for a wide variety of situations, but customers can make better use of the system's capabilities by following some of the do’s and don’ts in this document.
- For dynamic HTML, keep the HEAD section of your HTML consistent across users and user agents. Move any user-specific tags and scripts to the end of the HEAD section. Move unique information such as unique IDs and timestamps into the BODY of the HTML whenever possible. This allows our HTML Streaming technology to be more efficient and increase performance.
- Add link tags with the ref attribute set to dns-prefetch in the HEAD section of your dynamic HTML for domains you reference in the BODY of your HTML. This will allow our HTML Streaming technology to trigger prefetching of DNS results while your dynamic HTML is being generated on your back end and delivered.
- Don’t incorrectly use cache-control headers for your HTML. Make sure your cache-control headers accurately represent the cacheability or non-cacheability of your HTML. This will make it easier for our systems to apply the right optimizations without the need for an overly-complex configuration.
- Load the most important images on the page statically in HTML.
- Use JPGs for photographs and other images that have millions of colors. Don’t use JPGs for images that have large blocks of solid color, simple shapes with crisp images, or heavy use of text.
- Use appropriate default quality settings for saving your JPGs. Using quality levels above 90% generally doesn’t provide a good balance of quality and performance. If you have an existing base of images with higher quality levels than necessary, do let Instart Logic know, as we can automatically reduce images the right quality level for you using our SmartVision transcoding feature.
- Use PNGs for images that have large blocks of solid color, simple shapes with crisp images, or heavy use of text. Don’t use PNGs for photos or images that have millions of colors these should be JPG images.
- Make very limited use of GIF images. Use PNG images in place of GIFs whenever possible.
- If you have a responsive site and want to serve smaller images for smaller device screens, you can avoid creating multiple copies of each image by taking advantage of our Image Resizing feature. Just keep single copies of the images you want scaled per device in one directory, and we can configure your site with device-specific scaling rules or your developers can embed resize commands in the query string of the image request to have our service resize, crop, or even apply filters as part of the delivery process.
Delivery of JSON and XML responses
- If you have API calls which respond with the same results for any user, you can consider caching those responses in our service.
- Split cacheable responses and non-cacheable responses into different paths so we can easily create rules around which responses can be cached and which should be delivered from the origin.
Object compression for JS, CSS, and HTML
- To offload your origin infrastructure, you can turn off any existing compression for dynamic objects and let our Global Network Accelerator service do that for you.
- Our system will automatically apply gzip compression to any JS, CSS, and HTML that passes through our system as uncompressed text.
- Do compress text objects such as JS and CSS that don’t change that often. Our service will automatically compress these items, but you may end up with additional bandwidth charges as we compress more often than we need to.
- Make sure to enable keepalives on your origin web servers or load balancing equipment.
- Make sure that your origin load balancers are not set up for stickiness based on the incoming IP. When using a service like Instart Logic, a large number of connections will come from a small set of IPs. To make effective use of your origin web servers, your load balancers should still be able to balance traffic across systems.
- Make sure that if you are using layer 7 load balancing, you are not making the incoming layer 7 connections sticky through to your origin infrastructure. When using a service like Instart Logic, a large number of requests will come from a smaller number of active connections and your layer 7 load balancer should be set up to unbundle and balance the load across your origin servers.
- Please let us know if you use domain sharding and provide information about which domains will always serve the same objects interchangeably. We can alias the domains in our systems to ensure higher cache hit rates.
- If you have a high number of objects coming from a single domain, do consider using at least two domains for sharding. Don’t use too many domains, as modern browsers will open more connections and don’t generally benefit from more than a couple of domains in a sharding setup.