Managing Traffic Spikes This Holiday Season

Preview:

DESCRIPTION

The holiday season is just around the corner, and for many websites—especially online retailers—this means huge spikes in web traffic. For many sites, a sudden surge in visitors can overwhelm servers, taking your site offline. Having your site offline during peak season not only affects the business bottom line, but also the brand's reputation. CloudFlare offers a host of services that will keep your site online, and lightning fast, throughout the holiday season no matter the size of the traffic. CloudFlare’s programer John Graham-Cumming explains how to fine tune CloudFlare to make sure your website is ready for traffic spikes this holiday season. For more information, please visit: www.cloudflare.com/overview www.cloudflare.com/support

Citation preview

Managing traffic spikes this holiday season

November 2014

John Graham-Cumming – Programmer

Elenitsa Staykova – Marketing

The web traffic during the holidays US: Black Friday & Cyber Monday (11.28 & 12.1) – peak sales

days Europe: Green Monday (12.8) - peak sales day

Christmas online shopping around the worldKey dates by country (2, 3, 4x normal daily sales)

Calendar of key dates Keep track of important dates:

Thanksgiving day (Nov. 27) Black Friday (Nov. 28) Cyber Monday (Dec. 1) Green Monday (Dec. 8) Christmas Eve (Dec. 24) Christmas (Dec. 25)

Website conversion rate vs. load times Walmart conducted study* (Feb 2012) to understand how website

page performance affects e-commerce conversion rates As load times increase from 1 to 4 sec., conversion rates sharply

decline

Introduction to CloudFlare● We help websites run faster, safer and smarter

o Speed up static and dynamic content, optimize images and Javascript deliveryo Defend against DDoS attacks and other common web threatso Easily enable apps like Google Analytics

● More than 2 million websites have signed upo Reddit, Meetup, Zendesk, Metallica.com, League of Legendso Major businesses, banks, and government agencieso Blogs, forums, and sites of all types and sizes and geographies

● 28 data centers across 5 continents - and growing

How CloudFlare helps manage spikes in traffic

Agenda: Hosting provider Control the access of certain IPs and regions Restore visitor IPs (download mod_cloudflare) Extend CloudFlare performance capabilities: - Send as little data as necessary - Send data in the right order - Cache more

Contact hosting provider to understand plan’s limits

CloudFlare offsets a lot of the load to your site via caching and filtering requests.

Contact hosting provider to understand actual limits in place for your actual hosting plan.

Control the access of certain IPs and regions

If you do not want/need traffic from certain IPs or regions, block them in your Threat Control panel

Note: blocking by IP will fully block visitors. Blocking by country will challenge all visitors from that region with a captcha

Ensure CloudFlare IPs are not restricted

CloudFlare operates as a reverse proxy to your site and all connections come from CloudFlare IPs. Restricting our IPs can cause issues for visitors trying to access your site.

https://www.cloudflare.com/ips

Restore visitors’ IPs back to server logs

Ensure visitors’ IPs show in your server logs

Install “mod_cloudflare” to restore original visitor IP back to server logs

mod_cloudflare: search for “mod_cloudflare” in support.cloudflare.com to get complete list of instructions

Extend CloudFlare performance capabilities

Where to access these settings?

CloudFlare Settings

Send as little data as necessary

AFTER AUTO MINIFY BEFORE AUTO MINIFY

Send as little data as necessary, in right order

CloudFlare Network Map

https://www.cloudflare.com/network-map

Websites combine many elements

● Static (CloudFlare automatically caches)o Imageso JavaScripto Cascading Style Sheets (CSS) and many

more!● Dynamic (not cached without Page

Rules)o HTMLo JSONo PHP (example...many more!)

Cache Everything Page Rule

Go beyond default caching, for the fastest site imaginable.

Cache Everything Page Rule - example

Cache Everything Page Rule - custom caching

Cache Everything Page Ruleedge cache expire TTL

Cache Everything Page Rulebrowser cache expire TTL

Cache Everything & Single File Purge

Cache Everything in Page Rules is the fastest way to deliver pages, or an entire site.

But use carefully, and know how to purge single files in dashboard or via API.

Purging cache -- single files (for performance)

Client API - https://www.cloudflare.com/docs/client-api.html (for programmatic purging of the cache)

Purge everything (only when necessary)

Forwarding Page Rule

Redirect at the edge of the network, instead of waiting for the request to come all the way to your server.

Forwarding Page Rule - redirect at the edge

Forwarding Page Rule - Add new rule

Forwarding Page Rule - set location and type

Forwarding Page Rule - the result

Try it for yourself: https://twitter.theburritobot.com

Q&A

Resources for future reference● www.cloudflare.com/support● Connect with us:

o blog.cloudflare.como www.facebook.com/cloudflareo www.twitter.com/cloudflareo plus.google.com/+cloudflare

Thanks!