Automated-Frontend-Optimization With Blaze
Automated-Frontend-Optimization With Blaze
Automated-Frontend-Optimization With Blaze
Introduction
I
t used to be that the answer to most Website performance problems was either
to add more hardware or reengineer the backend application code. For most
sites, the backend is now the small part of the problem. Pages are generated by
the backend quickly but downloading and rendering the frontend code and
resources takes a long time. Research shows that for many popular sites it’s the
frontend that accounts for over 90% of a users wait time. Content Delivery
Networks (CDNs) help address part of this problem by reducing network latency.
However, even larger performance gains can be achieved through Frontend
Optimization (FEO) techniques that streamline the Web page HTML code and
resources.
There are four important trends making the frontend an important performance
issue today and potentially even more important in the years to come:
1. Rich content. Viewing a chart of size vs. time, it goes up and to the right. Since
1995, the average size of a page has grown over 35x, and the number of
objects per page has grown 28x. Larger, link heavy pages are driving up
frontend load times.
2. Client side code. Not so long ago most sites were fairly simple combinations of
HTML and graphics. All the “heavy lifting” was done on the backend. Now
almost all sites have some JavaScript code. More sophisticated sites are using
AJAX and now HTML5. As we move to replace desktop apps with Web apps,
client side code is going to get more sophisticated in order to emulate the
rich user experience we’ve come to expect.
3. 3rd party content. Usage of third party sites such as Twitter feeds, Facebook
“Like” buttons, Doubleclick ads and Google analytics code is growing rapidly.
For some sites, these 3rd party links comprise over 25% of their total
requests. 3rd party sites are notorious for blocking or slowing down frontend
performance and browser rendering.
4. Mobile browsers. Increasingly visitors are browsing sites on mobile devices
with weaker processors and slower connections. Frontend performance is
critical for desktop browsers but it’s even more important for the mobile
Web.
Unlike CDNs and DSA, FEO is focused on changing the HTML and page resources to
reduce network usage and browser bottlenecks. FEO makes the content itself faster
by dynamically optimizing the HTML code and page resources. FEO reduces the
number of page resources required to download a given page and makes the
browser process the page faster. CDN and DSA services can then help accelerate the
network activity that remains.
This is just a partial list of potential FEO techniques. You can find more information
on FEO approaches in Even Faster Web Sites: Performance Best Practices for Web
Developers by Steve Souders or using tools like YSlow or PageSpeed.
Despite the potential for large performance gains, not many sites have invested in
frontend optimization. This is sometimes due to lack of knowledge but more often
due to the high cost of implementation. FEO projects compete for the same scarce
engineering resources that are focused on adding more functionality. Also,
implementing FEO requires an upfront investment to retrofit sites and an ongoing
investment to keep it optimized. For example, one major airline site recently hired a
team of 3 consultants for 6 months to implement a modest list of optimizations. In
another case, a media site implemented a series of optimizations. The site was then
redesigned and the optimizations were wiped out.
It’s not just Website designs that are constantly changing; browsers are also
evolving at a rapid pace. The way you optimize for one browser might not work for
another. Some optimizations like domain sharding sometimes hurt mobile
performance where they would benefit desktop browsing. Keeping track of the
constant browser changes and tuning the site for each one can be costly.
In order to reduce FEO time and cost concerns, new technologies are now available
that will automatically optimize pages. These technologies dynamically transform
HTML and page resources to apply FEO best practices as users browse the site.
Automated FEO is typically applied after the page has been dynamically generated
by the server and can handle both static and dynamic sites.
Blaze Architecture
Blaze sits between the Web server and the user. After the server dynamically
generates the HTML, it is routed through Blaze where a series of pre-computed
optimizations are applied. The user then receives the “Blazed” or modified page in
their browser.
The Blaze Agent sits in the line of fire and dynamically transforms each HTML page
request to the origin server. The Blaze Analysis Center (BAC) has two jobs: 1)
analyze pages for the site and create a set of transformation instructions for the
Blaze Agent and 2) create new optimized resources and push these to the CDN edge.
For example, assuming Blaze applied a CSS consolidation optimization, the following
steps would be performed:
Using this method you can test the performance of the “Blazed” site and validate
that all pages look and function as they did before.
Blaze Configuration
The Blaze administration console is a Web application that allows you to configure
Blaze optimizations for your site. Among other functions, the administration
console allows you control:
Conclusion
The Web frontend is the single most important performance issue for most sites
today. A CDN combined with a frontend optimization solution can help to alleviate
this bottleneck and make the site run more efficiently at the same time. FEO has the
potential to double performance of most sites but takes time and effort to
implement manually. Automated technologies such as Blaze can provide instant
optimization at a fraction of the cost of manual coding efforts.
To see how fast your website would be with Blaze fill out a free website speed
report and see a before / after comparison:
http://www.blaze.io/website-speed-test/