How WPEngine Brings Blazing Speed to 300,000+ Websites

How WPEngine Brings Blazing Speed to 300,000+ Websites

TL; DR: In a world where milliseconds matter, WPEngine’s unmatched technology delivers WordPress sites at incredible speeds with incredible value. By bringing high technology to the masses, WPEngine is truly a pioneer in the WordPress industry.

There is no doubt that WordPress dominates the Internet. It is simple to install, develop, and deploy for developers, and a no-brainer to use for content writers. Given that, WordPress does have its issues for those who need higher performance in PHP, want to have 100 percent uptime and require screaming fast page loads.

Jason Cohen - Founder of WPEngine

WPEngine Co-Founder Jason Cohen

Page load times matter! From Google to Walmart to Amazon, it is clear that load times impact revenue.

Luckily, companies like WPEngine are grabbing the bull by the horns and striving to push the envelope on what is possible with WordPress.  WPEngine has the highest technology available to win you those precious seconds.

We had a chance to sit down with Jason Cohen, a Co-Founder of WPEngine, and discuss all of the technical details of their page caching systems and their Alpha Labs project. Alpha Labs is to WordPress technology what Lockheed’s Skunk Works is to aviation tech.

Who Needs Page Caching Anyways?

In case you didn’t know, there are a multitude of reasons load times, as well as the subject of page caching in general, are extremely important to businesses running WordPress.

We will cover a few and provide some links for further research. In reality, there is virtually no logical reason you wouldn’t want to have the fastest possible pages on your site, so you may as well spend some time thinking about it.

Who Needs Page Caching?

Revenue!

In studies by both Standford (via Amazon) and Walmart, it was found that every 100-millisecond difference in load time affected revenue by one percent. Put another way, for every second of load time that you save, you increase revenue by about 10 percent.

Organic Traffic

While it is not directly confirmed by Google, it is widely believed and reported that faster page load times can increase your organic traffic by up to 15 percent. When you consider that most sites are largely based on organic (and free) traffic, that can become a very big deal.

User Experience

On top of all of the other reasons, perhaps one of the most compelling reasons to decrease page load times is the fact that user experience is greatly enhanced.

In fact, a study by Google found that their traffic dropped by 20 percent when their page load times were 500 milliseconds longer. Basically, if people had to wait 500ms (half a second) longer, they would abandon their search on Google.

This is what Google found. Now imagine someone on a less trusted site than Google. Are they really willing to wait? The chances of visitors sticking around your site are even less likely when you have long page load times.

In short, the slightly higher price you pay for better (and faster) WordPress hosting is worth it in the long run. You’ll have increased revenue and traffic and happier users.

Now that we got that out of the way, let’s take a look at how WPEngine is the crème de la crème of WordPress hosting for speed.

Current Tech: Advanced Caching for Speed

Many folks who are using WordPress eventually come to see the need for some kind of caching system. Between Apache, PHP spooling, and the many database transactions, WordPress can easily be slowed to load times over many seconds in duration.

This is when a lot of people realize the need for W3 Total Cache, BatCache, or WP Super Cache. The problem with these caching systems is that they still end up spooling PHP (which can take upward of 500ms on its own) before serving cached pages from memory or disk.

Aside: WPEngine is hiring! If you are a great person and love WordPress and technology, you should check out this opportunity.

WPEngine Jobs

Caching Concerns in WordPress

It turns out there are a lot of concerns when trying to speed up WordPress. Think of the following list of questions and how you might handle them:

  • Are users logged in or not? If they are, do they see different content? Think of shopping carts, usernames, customized content, etc.
  • Are bots and/or illegitimate users making it to your cache or Apache? If they are, they should be filtered out beforehand.
  • Do you have specific mobile, tablet, and desktop landing pages? Are those going to be cached separately?
  • Do you serve different versions of your page based on language? Are those cached separately, too?
  • How and when do you purge pages?

Those of us who use Varnish know there is a learning curve and a bunch of special edge cases, maintenance, and WordPress idiosyncrasies involved. First, you need to invest time and energy into learning VCL, and then you have to implement a system that you will surely get wrong multiple times.

WPEngine Handles All of That and More For You!

Cohen described how WPEngine uses a mixture of security features, selective traffic routing, Varnish, and NGINX to provide seamless WordPress page caching to their users.

WPEngine Uses Full Page Caching to Speed Up Your Site

WPEngine uses full page caching to speed up your site.

Segment the Traffic to Help Scale

First off, WPEngine realizes all traffic is not created equal. By segmenting malicious users, comment spammers, bots, and other lower priority traffic, they are able to keep the load lower on their servers and, in turn, faster to respond to high-quality traffic.

“While malicious users may not be a security threat, they still take up precious resources on the server,” Cohen said. Also, as the load increases, WPEngine can selectively degrade bot service in their queue, so bots don’t end up swamping their servers. “Segmenting and caching is complicated, but for good reason,” he explained.

Page Caching

The problem with solutions like W3 Total Cache, Bat Cache, and Super Cache is they all have to hit and run PHP just to serve a page. “Hitting PHP at all is costly,” Cohen said, and we couldn’t agree more.

We have seen some time-to-first-byte (TTFB) speeds with a bare-bones WordPress install upwards of 500 ms, and with Varnish, we have seen that drop down to tens of milliseconds. There really is no comparison.

In fact, WPEngine utilizes a combination of Varnish and NGINX to serve up its page caches. Varnish serves up resources that have shorter lifetimes and the need to be purged while NGINX serves up long-term, static url and purge-less assets.

“With Varnish, you get about 10-times the speed over the FASTEST you could configure with BatCache or W3 Total Cache. In addition, you can do more simultaneously,” Cohen said.

Since PHP is hit less, that means you can service more uncached requests. Varnish and NGINX can also handle a lot of traffic per second. Simply put, it is an amazing leap of technology to bring advanced technology like Varnish and NGINX caching to the WordPress masses.

The Future of WPEngine, Page Caching, and WordPress Speed

Fortunately, WPEngine’s current technology is just the tip of the iceburg when it comes to where they want to take site speed over time.

The Dynamic Nature of the Web

As the Web progresses, we are seeing a growth in not only web applications, but in customized dynamic content tailored to the individual. This causes problems for the current paradigm of full-page caching.

“The Web is not going to be more static over time. It is going to more dynamic and it’s wonderful.” — Jason Cohen, Co-Founder of WPEngine

“Ultimately, page caching is the wrong tool. The even more interesting question is: What does it mean to host without page caching at all so that those things are not an issue? Imagine you can scale and be fast enough just in PHP while being flexible and dynamic,” Cohen said.

WPEngine currently has some amazing technology being developed for their next-generation servers. We will cover these in more detail in an upcoming article, but for now we will provide a brief overview below.

Lua and NGINX

WPEngine is looking at rewriting their Varnish caching system in Lua to utilize the speed of NGINX. Currently, they do not have a great way to purge assets or use dynamic URLs, but they feel like they can decrease the page load times by moving toward a full NGINX system.

Using Amazon S3

There are a variety of projects WPEngine is looking at Amazon S3 for. One of them applies if a user has a truly static page, then “you might as well host on S3, which is the most scalable thing on Earth,” Cohen explained. In this case, WordPress might become a site owners “staging area” and the site is actually served from S3.

HHVM

Facebook is written on PHP. They are lucky enough to have the resources and ability to take a hard look at how to improve its performance.

Their answer was to open-source a project called Hip-Hop, or HHVM, which is a just-in-time compiler for PHP.

WPEngine is working with Facebook to bring HHVM support to WordPress on a grand scale. We here at HostingAdvice.com utilize HHVM on our PHP scripts and have seen a three- to five-times increase in speed. This makes us excited and anxious to see what WPEngine has coming down the road!

Conclusion

We have only covered the tip of the iceberg regarding WPEngine’s remarkable technology and implementation. Hopefully, we were able to convey how important page caching is and how WPEngine can make it simple for you.

We also spoke with Cohen regarding WPEngine’s Alpha Labs. If you think their state-of-the-art technology is amazing, you will be floored by what they have over the horizon. We are going to dedicate a number of future articles to cover Alpha Labs.

As always, if you have any questions or comments, please feel free to leave a message below!

Ryan Frankel

Questions or Comments? Ask Ryan!

Ask a question and Ryan will respond to you. We strive to provide the best advice on the net and we are here to help you in any way we can.