Taking our site Global (Website) Leave a comment

So our first post on our blog. Isn’t it exciting? We’re going to talk about how we took our site global and the challenges that we met.          
For the past 3 months we have operated three separate sites for our eCommerce website, with servers in different geographical locations and over the last couple months, we have outgrown our current setup as we want to expand further afield without having to set up local sites in every geographical region. This started to be a pain in the ass with having to copy product between sites as well as having to update site information separately. As such we wanted to move to a global setup with a single larger server and I thought I would document my attempts to help others in the future. We also changed WordPress/WooCommerce Themes. Our Aim was to get our site to load (repeatedly) in less than 2s in all our target markets.
So now on to where we are starting from.

In the beginning

All our sites were hosted through Cloudways using Kyup in Chicago, Singapore & Amsterdam. Our websites were running on Cloudways optimised setup with Varnish running in front on our WooCommerces sites. We were also using WP Rocket for site caching, optimization and minification. We have been using the Free Cloudflare plan in front of our sites but see little to no performance benefit due to the close proximity of servers to our end users.

Starting Test:

I have tested the starting sites from their local region, as that is what we will be comparing them to afterward. These tests are all second loads (second run)  to ensure that any caching takes place is accounted for. We are only testing the Homepage, as this is our most served page.
EU Site – https://tools.pingdom.com/#!/sCO0M/eu.thesolutionshop.global
Pretty fast, as expected for a localized site.Our EU (Hosted in Amsterdam) site has been more heavily optimized than our other two as that is where the bulk of our customers came from in the beginning.

USA Site – https://tools.pingdom.com/#!/d6DnNW/usa.thesolutionshop.global
Fastish, Especially considering the unoptimised page size. 9.3MB!

Oceania Site – https://tools.pingdom.com/#!/buqtL7/oceania.thesolutionshop.global
Quite Slow. 4.3s. This is the site that we are most worried about slowing down further, but we’ll see what happens.

The Next Step:

The next thing we did was perform a cosmetic re-do of the site and switched WordPress/Woocommerce theme. We also consolidated all our payment information, return information ext onto one site. We then hosted this site in the USA in Silicon Valley (using Cloudways on Vultr) because it was effectively in between our target markets of Oceania, Asia, the USA and Europe. We choose Silicon Valley within the united states because it is closest to the submarine pipes that we hoped would carry our data faster to Oceania. The site was set up on the Domain globaltest.thesolutionshop.global with a Let’s encrypt Certificate.

The first test we performed was from all three locations – Melbourne, San Jose & Stockholm on our RAW site with Cloudways Varnish turned off and no Cloudflare or WP Rocket.

USA – https://tools.pingdom.com/#!/8GYNj/globaltest.thesolutionshop.global
2.35-2.4s (4 Tests). About the same as our local server.

Oceania – https://tools.pingdom.com/#!/twKLG/globaltest.thesolutionshop.global
7.71-8.25s (4 Tests). This was very slow. Slower than our local(ish) server in Singapore.

EU – https://tools.pingdom.com/#!/ec5JOp/globaltest.thesolutionshop.global
6.1s – 6.2s (4 Tests). Again slow then our local server, but that is to be expected.

After these tests, it seems like our re-design has had some a positive impact on load times, with the USA site speeding up without any caching yet. Slow results to Europe and Oceania was expected.

It’s time to Enable WP Rocket.

It’s time for blast off

We then enabled our favorite WooCommerce compatible and Currency Changer Compatible caching, optimizer and all round speedier WP Rocket. We are still keeping Varnish cache disabled at this point.

We ran all our test at least one time before to build the cache. Then ran the test 4 times and reported the range.

Speed Tests:

USA – https://tools.pingdom.com/#!/cFDaVx/globaltest.thesolutionshop.global
After 4 test we got down to 1.66-2.2s. That is extremely good and we would be happy with that speed for the USA.

Oceania – https://tools.pingdom.com/#!/bZHh9h/globaltest.thesolutionshop.global
Getting much faster now 4.1s-4.4s. Massive decrease in load time (4s), although this could likely be due to different network conditions, so take this one with a grain of salt.

EU – https://tools.pingdom.com/#!/cFDaVx/globaltest.thesolutionshop.global
3.4 – 5.4s. Getting Fast but that large a variation is where a CDN should help to overcome transatlantic congestion.

It’s time to get out the varnish

Now we are going to enable varnish on the origin server. When using Varnish, WP Rocket and Cloudways remember to implement these changes.

Again, We ran all our test at least one time before to build the cache. Then ran the test 4 times and reported the range.

USA – https://tools.pingdom.com/#!/DL2Gg/globaltest.thesolutionshop.global
1.5s-1.8s. Much as before.

Oceania – https://tools.pingdom.com/#!/bply92/globaltest.thesolutionshop.global
4.5s – 4.8s. Much as before.

Europe – https://tools.pingdom.com/#!/eHsNY4/globaltest.thesolutionshop.global
3.7s – 4.2s. Much as before.

Varnish only made a small change to our load times but performs much better at scale than just WP Rocket on it’s one so we are still happy with these results.

Reach for the stars

Now comes time for the CDN. We are going to choose CloudFlare because it is Free and has a great amount of POPs in our target markets, along with low latency times.We’ve heard rumors about Cloudflare not allowing access to some of its Asia and Oceania POPs if you are not on a paid plan. We will see how true that is.

Again, We ran all our test at least one time before to build the cache. Then ran the test 4 times and reported the range. We also did a manual check of the header of a page to make sure it was going through CloudFlare’s network.

USA – https://tools.pingdom.com/#!/eDe6LA/globaltest.thesolutionshop.global
1.5s – 1.9s. About the same speed as before. Happy with this as did not except CDN to make much of difference so close to origin server.

Europe – https://tools.pingdom.com/#!/bSM5ob/globaltest.thesolutionshop.global
1.9s – 2.3s. Considerably faster than before. Although still above our 2s target.

Oceania – https://tools.pingdom.com/#!/bHeaM1/globaltest.thesolutionshop.global
2.9s – 3.1s. A considerable improvement on before. Although above 2s Target.

CloudFlare seems to have done its job, but I am still suspicious of that Oceania test. I have a feeling it is being routed to their Hong Kong POPs instead of domestic.

All boosters go

It’s time to upgrade CloudFlare to the Pro plan and see how fast we can get it going.

We upgraded. Enabled Marriage and Polish (Set to Lossy Compression). And Cleared the CloudFlare cache. Let see if it helped us.

Again, We ran all our test at least one time before to build the cache. Then ran the test 4 times and reported the range.

USA – https://tools.pingdom.com/#!/gxmqZ/globaltest.thesolutionshop.global
1.55s – 1.9s. Slight Improvement on consistency.

Europe – https://tools.pingdom.com/#!/chZm95/globaltest.thesolutionshop.global
2.1s – 2.2s. Happy with this result now. Page size has decreased to 1.7MB. Not quite at 2s but nearly good enough.

Oceania – https://tools.pingdom.com/#!/chhZSh/globaltest.thesolutionshop.global
2.9s – 3.1s. Initial thoughts about POPs routing seems unfounded. Still relatively happy for this load time on the home page that has much more content than any other page.

One in the chamber

We’ve got one more trick up our sleeves to try and squeeze the last bit of performance out of our site. That being CloudFlare’s own Argo service. Let see what happens.

USA – https://tools.pingdom.com/#!/b4Gu0c/globaltest.thesolutionshop.global
1.7s – 1.9s. We weren’t really expecting any changes.

Europe – https://tools.pingdom.com/#!/cUzxmi/globaltest.thesolutionshop.global
2.1s – 2.2s. No change really.

Oceania – https://tools.pingdom.com/#!/bEui5c/globaltest.thesolutionshop.global
2.9s – 3.1s. No Change.

Although this made little change to our homepage it does seem to have an impact on our Cache hit rate. It also means that when customers need to connect to the origin server, such as at checkout, slowdowns are minimized. We have also discovered that the first load time for an area (where a local POP does not store a cached version yet) was much faster.

Overall we were extremely happy with our Globalization of our store and movement of it from separate to the same site, and it seems to have had little impact on our overall site speed. Our fears about our Oceania store slowing down further were unfounded (It increased speeds by 1.5s)

USA Before – 2.5s – https://tools.pingdom.com/#!/d6DnNW/http://usa.thesolutionshop.global
USA After – 1.7 – https://tools.pingdom.com/#!/cCQhZd/https://globaltest.thesolutionshop.global

Oceania Before – 4.3s – https://tools.pingdom.com/#!/buqtL7/oceania.thesolutionshop.global
Oceania After – 2.8s – https://tools.pingdom.com/#!/k6nac/https://globaltest.thesolutionshop.global

Europe Before – 1.76s – https://tools.pingdom.com/#!/sCO0M/eu.thesolutionshop.global
Europe After – 1.75s – https://tools.pingdom.com/#!/dJU83Y/https://globaltest.thesolutionshop.global


We have since implemented a number of further changes to allow for increased levels of caching. These include using AJAX to load pricing in different currencies (it also means content is viable for longer because exchange rates can no longer go stale). This has allowed us to full cache most content at the edge of CloudFlare’s network and further decrease load times to below 1s for most pages globally and around 2s for our front page.

The Services, Software, and Plugins we use:

  • WooCommerce
  • WordPress
  • CloudFlare
  • CloudFlare Argo
  • Cloudways (Nice Support, Quick Replies and know their stuff)
  • Vultr
  • Varnish
  • Aelia Currency Converter (Awesome People! – Helped us a lot with our final AJAX currency optimization)
  • WP Rocket (Probably the best WordPress Caching software out there – until breeze is fully WooCommerce compatible)

Leave a Reply

Your email address will not be published. Required fields are marked *