際際滷

際際滷Share a Scribd company logo
SERVERLESS ARCHITECTURE FOR
AUGMENTING WORDPRESS
A Case Study by Japh Thomson
SETTING
THE SCENE
Limitations of traditional
platforms and responsive images
RESPONSIVE CHALLENGES
 Many devices  many sizes
 Lots of storage space
 Lots of bandwidth
 Intensive processing
PROBLEM?
Many sites, lots of tra鍖c,
many devices, lots of images
PROBLEM!
 Large blog networks
 Two with 8M+ page views
per month each
 Fashion / Foodie / Lifestyle
niche
 Many blogs, many bloggers,
many photos
 About 2TB of images and
growing
 Processing, storage,
bandwidth
WORDPRESS
 Responsive image sizes
handled natively (since 4.4)
 Can handle creation of
multiple image 鍖les for sizes
 Cant really solve the entire
problem at this level
SOLUTION(S)
A progression
TACHYON
 Deals with image resizing on-
the-鍖y
 Faster than light image
processing.
 Inspired by / Forked from
WordPress.com's Photon
 PHP-based
 Switched from Graphics Magic
to Image Magick
 Hosted on AWS
 Backed by S3
 Sits behind CloudFront
WORDPRESS PLUGIN
 Plugin rewrites URLs
 Images on S3 to Tachyon
URLs
 WordPress handles the
speci鍖c responsive image size
required
TACHYON IN NODE.JS
 Faster and better threading
 Uses Sharp for image
processing
 Can also be con鍖gured as a
proxy for the main process to
run in Lambda
WHAT IS LAMBDA?
 AWS Service
 Run code without having to
think about servers
 Renting processing time on a
server, rather than the whole
server
 Can run Node.js, Python, or
Java
TACHYON ON LAMBDA
 Serverless! (Almost)
 Still need the proxy, until
AWS API Gateway can return
binary data from Lambda
functions
 Nginx proxy is very thin
and fast
 Inherently scalable
VISUALISE
An evolving infrastructure
Serverless Architecture for Augmenting WordPress
Serverless Architecture for Augmenting WordPress
Serverless Architecture for Augmenting WordPress
Serverless Architecture for Augmenting WordPress
Serverless Architecture for Augmenting WordPress
Serverless Architecture for Augmenting WordPress
RESULTS
Does the customer care?
PROOF IS IN THE PUDDING
 Saving money on storage, as
image sizes are generated on-
the-鍖y, stored in the CDN
 Faster for visitors as more
device sizes can be covered
 Saving money on processing,
as Lambda is only called when
needed, no EC2 instances
sitting around
 Fun to work on!
THANKS!
QUESTIONS?
@Japh
from @HumanMadeLtd
Serverless Architecture for Augmenting WordPress

More Related Content

Serverless Architecture for Augmenting WordPress