Get the most out of section.io
Understand how your website is performing and uncover how you can make it faster, more scalable, and more secure.
This is a guide for users new to section.io. First we’ll discuss how to evaluate your website so you can understand how you are performing today. Then we’ll discuss an 7 step action plan to help you get setup with section.io to supercharge your website.
A. WEBSITE EVALUATION
We’ll use Bootcamp, section.io’s demo account, to illustrate how to evaluate a site. Then, follow the action plan below to evaluate your own site.
1 Cache Usage - Understand if your cache is effective
What is it?: How effectively customer requests are being answered by the cache. A hit means that the request was answered by the cache. A miss means that the request went to the cache but could not answer the request. A pass means that the request didn’t look at the cache to answer the request. The goal is to increase Hit % and decrease Miss and Pass %. A good starting goal would be 50% Hit.
Why do you care?: When a customer request is answered by the cache, the request did not need to be answered by your website server. This improves page load time for your users which can increase revenue and decreases work required by your servers which reduces cost.
How do you see it?: This is the first chart we show you on the section.io dashboard. For the Bootcamp application, the url is here.
For more detailed information, such as the absolute number of requests and size of those requests, you can view Trending Metrics here.
2 Content Type Caching - Discover your quick cache wins
What is it: Your website has several different types of content that can be cached: HTML, Images, CSS, and JS are the main file types for consideration.
- HTML is the set of instructions required to load the page.
- Images are any images or icons you load.
- CSS is the style instruction for how to load images, text, and content on the page. And
- JS is small scripts your browser will run as when it is instructed to by the HTML.
You can view your hit rates, volume of requests, and time to serve for each of these different content types.
Why do you care?: Understanding which types are being requested the most, require the most time to serve, and are being cached the most frequently helps you understand where your quick wins are to get started optimizing your cache configurations.
Most of the time, images and CSS will be the easiest to get some cache wins and HTML is the most likely to give you your biggest performance and scalability wins as the hit rate increases.
How do you see it?: There are two dashboards in Grafana under
Real Time -> Monitoring to understand content type caching.
First, is request performance which shows throughput and time to serve by status. You can access this for Bootcamp here.
Second, is asset cache hit rates which shows the hit rate by content type. You can access this for Bootcamp here.
3 Secure Delivery - Uncover how often you are using HTTPS
What is it?: HTTP is a protocol for how web requests are handled. HTTPS is an enhanced version of that protocol to add security by encrypting your customers data so it is protected from threats. You can see when a webpage has HTTPS because the url will show a green padlock.
Why do you care?: The percentage of requests that have HTTPS show how often your customer data is protected. If this ratio is low, you are putting your customers’ data at a higher risk for incident. Websites which serve entirely over HTTPS can also take advantage of the performance benefits of HTTP/2 and will be ranked higher by Google in search results.
How do you see it?: You can your websites breakdown of HTTP vs HTTPS by going into your logs. To build a nice pie chart, you want to filter by
_type:edge-access-log which limits the count to only requests to the edge proxy and then split by
scheme which indicates HTTP or HTTPS. You can see this for Bootcamp here. (note our Bootcamp application is showing a low HTTPS ratio)
B. ACTION PLAN
1 Create Application
WHY To evaluate your own website, you will need to create an application for your website.
HOW You will be asked for your web domain and origin and to select the reverse proxies you want for your application. It is ok if you don’t know the best setup, you can always change it later after you review your metrics. We recommend starting with Varnish 4.0. More details here.
2 Go Live
WHY To capture metrics and setup caching configurations, you need to send your traffic through section.io’s platform.
HOW To go live you need to change your DNS to point to section.io. You can either host your DNS directly with section.io, or change your DNS records with your current provider. More details here. We will also provide you with an SSL certificate to get you setup with HTTPS, however, you can also upload your own certificate if you prefer. Details here.
3 Review Your Metrics
WHY To understand how to improve your site, you first need a benchmark for where you are now.
HOW After you go live, wait about an hour for data to populate. While section.io’s real time reporting will show data inside the first minute of go live, you should wait an hour for trends to emerge. Then use the evaluation guide above to look at your key metrics.
4 Setup your Local Environment
WHY Before you make any changes to your cache configuration, we recommend you test them locally first. In order to test, you need to setup your local environment.
HOW Make sure you have git, vagrant, and virtual box on your local machine. Download section’s command line interface and run the section up command as described here. If you do not want to do this step, you can skip it and make your changes live on production.
5 Optimize your Configuration
WHY Based on your metrics evaluation, you should have identified areas you want to improve. These changes will help you get the most out of section.io
HOW To change your configurations, go to the proxy tab in your section.io account. Here you can select configurations you want and we will write the code and deploy or for you. You can also go to the repository tab and edit the config file with your own code or edit using your command line. Details here. To learn about how to write code for your reverse proxy, visit the documentation for your selected proxy. For varnish 4.0 that is located here.
6 Track your Changes
WHY Everytime you change your configuraiton, section.io will log that history. This allows you to see what was changed and then review metrics to see how your site performed before and after the change.
HOW In the repository tab under commits you will see a list of the commits that have been made to your application. You can see what that looks like for Bootcamp here.
7 Monitor your Website
WHY You may not want to be checking your metrics everyday, but you want to know if something is wrong so you can fix it. With Alerts you can set benchmarks for your metrics and be alerted via your preferred notification system.
HOW Under the alerting tab you can identify a metric using graphite query string and at what value you want to be alerted. More details here.
Completed all 7 steps?
Awesome! Steps 5 through 7 are meant to be an iterative process. Focus on big wins first using your metrics evaluation. Then after you’ve improved those areas, you can focus on other areas to fine tune.
How do I know if I’ve been successful?
- You have improved your Cache Hit Rate
- You have ensured your most requested content is being cached
- You have increased the ratio of HTTPS on your site
- Because you’ve achieved these three goals, you see your customers bouncing less frequently and viewing more pages on your website - which will translate into more revenue for you! Congrats!
section.io is here to help with setup and can be reached by emailing email@example.com. If you want help with configuration you can ask us about consulting engagements, and if you want a fully managed service please contact us for a quote.