~/talk

Serverless PHP: how does it really work?

Talkat PHP UK Conference 2024 · 2024-02-15..02-16· [serverless, php]
slides:none on file

Bref runs PHP on AWS Lambda using PHP FPM behind Lambda Function URLs or API Gateway, mounted from container images and served inside Firecracker microVMs. Each Lambda instance handles one-request-per-instance concurrency with cold starts (hundreds of ms to ~1s depending on app size), prewarming reduces cold starts to ~0.01% of requests, and limits include 15 minute execution, 6 MB responses, and default instance caps that AWS raises on request. Deploys use composer plus a bref.yml and support S3, SQS, EventBridge, and Laravel Vapor.

AI-written summary · about

  1. 0:00Serverless PHP hosting intro
  2. 1:04What is serverless
  3. 3:11Introducing Bref
  4. 5:59Deploy PHP app with Bref
  5. 6:43Live demo: Bref scaling
  6. 9:52How serverless PHP works
  7. 11:59Lambda instances and cold starts
  8. 14:31Firecracker behind Lambda
  9. 17:03Bref runtime and PHP-FPM
  10. 20:59PHP-FPM concurrency
  11. 22:24Scaling and request handling
  12. 24:29Cold starts impact
  13. 26:39Cost model with Bref
  14. 28:24Traffic spikes and costs
  15. 30:12Non-HTTP events with Bref
  16. 33:46Worker mode optimizations
  17. 34:48Who should use serverless PHP
  18. 37:22Real-world use cases
  19. 39:50When not to use serverless
  20. 41:14Q&A: Persistent opcache
  21. 44:23Q&A: AWS limits vs Vapor
  22. 47:57Q&A: Local dev and testing
  23. 50:04Q&A: Cost of long tasks
  24. 52:39Q&A: Instance scaling
  25. 54:24Q&A: Non-standard PHP extensions
  26. 55:57Q&A: AWS instance spawning
  27. 57:22Q&A: Cold start UX
  28. 58:05Q&A: DB credentials securely
  29. 59:10Q&A: Detecting cold starts
  30. 1:00:14Q&A: Bref usage tracking
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.