Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
A look at serverless WordPress
Slide 2
Slide 2 text
2 Hi! 2 I’m Carl Alexander @twigpress carlalexander.ca
Slide 3
Slide 3 text
No content
Slide 4
Slide 4 text
“Servers. Can’t live with them. Can’t live without them.” - WordPress developer (when a server blows up)
Slide 5
Slide 5 text
Server management
Slide 6
Slide 6 text
Still responsible
Slide 7
Slide 7 text
WordPress hosting
Slide 8
Slide 8 text
Still need to over provision
Slide 9
Slide 9 text
Serverless addresses these problems
Slide 10
Slide 10 text
1 What Is Serverless?
Slide 11
Slide 11 text
“Are there really no servers with serverless!?” - Literally everyone I mention serverless to
Slide 12
Slide 12 text
No content
Slide 13
Slide 13 text
Marketing term
Slide 14
Slide 14 text
Functions as a Service
Slide 15
Slide 15 text
On-demand computing
Slide 16
Slide 16 text
Upload code to a cloud provider
Slide 17
Slide 17 text
Code gets executed in response to an event
Slide 18
Slide 18 text
No mention of servers
Slide 19
Slide 19 text
Outside your sphere of concerns
Slide 20
Slide 20 text
2How Does It Work?
Slide 21
Slide 21 text
WordPress on a server
Slide 22
Slide 22 text
No content
Slide 23
Slide 23 text
Serverless WordPress is serverless PHP
Slide 24
Slide 24 text
How does PHP work on a web server?
Slide 25
Slide 25 text
No content
Slide 26
Slide 26 text
How does serverless PHP compare?
Slide 27
Slide 27 text
Both run code in response to an event
Slide 28
Slide 28 text
So what’s different?
Slide 29
Slide 29 text
Not just PHP that runs without a server
Slide 30
Slide 30 text
Everything is serverless
Slide 31
Slide 31 text
Service based architecture
Slide 32
Slide 32 text
No content
Slide 33
Slide 33 text
PHP runtime?
Slide 34
Slide 34 text
Unique element of serverless PHP
Slide 35
Slide 35 text
What does it do?
Slide 36
Slide 36 text
Processes lambda event
Slide 37
Slide 37 text
Figures out what the event wants
Slide 38
Slide 38 text
Sends a result back (HTTP response)
Slide 39
Slide 39 text
Mimics a web server
Slide 40
Slide 40 text
Request a file, returns a file
Slide 41
Slide 41 text
Creates FastCGI request, sends it to PHP-FPM
Slide 42
Slide 42 text
Also manages the PHP-FPM process
Slide 43
Slide 43 text
Only one PHP-FPM worker
Slide 44
Slide 44 text
Lambda only handles one event at a time
Slide 45
Slide 45 text
Serverless WordPress architecture
Slide 46
Slide 46 text
No content
Slide 47
Slide 47 text
3Advantages of serverless
Slide 48
Slide 48 text
No content
Slide 49
Slide 49 text
No servers to manage
Slide 50
Slide 50 text
Not everyone is comfortable with servers
Slide 51
Slide 51 text
Still responsible
Slide 52
Slide 52 text
WordPress hosting solves this issue
Slide 53
Slide 53 text
New problem. Scaling.
Slide 54
Slide 54 text
WordPress hosting is single server
Slide 55
Slide 55 text
Each Lambda function is a PHP worker
Slide 56
Slide 56 text
No content
Slide 57
Slide 57 text
Scaling in seconds not minutes
Slide 58
Slide 58 text
No content
Slide 59
Slide 59 text
Need to plan for the worst with servers
Slide 60
Slide 60 text
How much would that cost?
Slide 61
Slide 61 text
None of that with serverless
Slide 62
Slide 62 text
Usage based pricing
Slide 63
Slide 63 text
Pay when your workers run
Slide 64
Slide 64 text
Charged by the millisecond
Slide 65
Slide 65 text
4Drawbacks of Serverless
Slide 66
Slide 66 text
No content
Slide 67
Slide 67 text
Less predictable cost
Slide 68
Slide 68 text
Paying for a server feels safe
Slide 69
Slide 69 text
$X/month
Slide 70
Slide 70 text
Need more performance? Pay more!
Slide 71
Slide 71 text
No content
Slide 72
Slide 72 text
How many requests? Average duration?
Slide 73
Slide 73 text
Stressful and harder to budget for
Slide 74
Slide 74 text
Costs less
Slide 75
Slide 75 text
AWS lock-in
Slide 76
Slide 76 text
No content
Slide 77
Slide 77 text
Why not Azure or GCP?
Slide 78
Slide 78 text
Not interchangeable
Slide 79
Slide 79 text
Not just Lambda
Slide 80
Slide 80 text
Need other services
Slide 81
Slide 81 text
Equivalent ≠ Same
Slide 82
Slide 82 text
Energy with AWS
Slide 83
Slide 83 text
WordPress assumes you’re on a server
Slide 84
Slide 84 text
Can’t install themes and plugins directly
Slide 85
Slide 85 text
Media library
Slide 86
Slide 86 text
WordPress plugins assume it too
Slide 87
Slide 87 text
Potential compatibility issues
Slide 88
Slide 88 text
5Evaluating Serverless
Slide 89
Slide 89 text
Tempting to only compare cost
Slide 90
Slide 90 text
“Serverless is expensive. I could just get a $5/month droplet from DigitalOcean.” - Someone comfortable with servers
Slide 91
Slide 91 text
Dishonest
Slide 92
Slide 92 text
Intangible costs
Slide 93
Slide 93 text
Mental health
Slide 94
Slide 94 text
Your time
Slide 95
Slide 95 text
6Tools and Projects
Slide 96
Slide 96 text
No content
Slide 97
Slide 97 text
Serverless WordPress is open source
Slide 98
Slide 98 text
github.com/ymirapp
Slide 99
Slide 99 text
Need to fund development
Slide 100
Slide 100 text
100 7 Ymir https://ymirapp.com/open
Slide 101
Slide 101 text
GitHub sponsor (github.com/carlalexander)
Slide 102
Slide 102 text
7Future of Hosting
Slide 103
Slide 103 text
Would you buy a physical server?
Slide 104
Slide 104 text
You get one in the cloud!
Slide 105
Slide 105 text
Next step
Slide 106
Slide 106 text
Serverless is deploy and forget
Slide 107
Slide 107 text
Levels playing field
Slide 108
Slide 108 text
What would you build?
Slide 109
Slide 109 text
?Questions
Slide 110
Slide 110 text
110 Thank you! 2 @twigpress carlalexander.ca blog.ymirapp.com