serverless architecture for augmenting wordpress
TRANSCRIPT
RESPONSIVE CHALLENGES
➤ Many devices … many sizes
➤ Lots of storage space
➤ Lots of bandwidth
➤ Intensive processing
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 files for sizes
➤ Can’t really solve the entire problem at this level
TACHYON
➤ Deals with image resizing on-the-fly
➤ “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 specific responsive image size required
TACHYON IN NODE.JS
➤ Faster and better threading
➤ Uses Sharp for image processing
➤ Can also be configured 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
PROOF IS IN THE PUDDING
➤ Saving money on storage, as image sizes are generated on-the-fly, 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!