Serverless PHP: how does it really work? - Matthieu Napoli

Php

Discover the truth about Serverless PHP, including its limitations, scalability, and potential drawbacks. Explore how Bref makes it easy to deploy and run PHP applications on AWS Lambda.

Key takeaways
  • Serverless PHP is not necessarily cost-effective due to the complexity of scaling and the potential for cold starts.
  • Cold starts can occur when a serverless application is first invoked, resulting in slower response times.
  • Bref is a PHP runtime for AWS Lambda that provides a simple way to deploy PHP applications.
  • Bref uses PHP FPM to run PHP code, which provides a similar environment to a traditional PHP setup.
  • Bref provides a YAML file and a CLI to deploy applications, making it easy to get started.
  • Serverless applications can be run in a variety of environments, including AWS Lambda, API Gateway, and EventBridge.
  • The PHP runtime for AWS Lambda is provided by AWS and is not open-sourced.
  • There are limitations to the PHP runtime, including a maximum response size of 6 megabytes and a maximum upload file limit.
  • Bref provides support for PHP extensions, including MySQL, and can be used with frameworks such as Laravel and Symfony.
  • Serverless applications can be scaled horizontally by increasing the number of instances.
  • The cost of a serverless application depends on the number of requests and the resources used.
  • There are potential limitations to the scalability of serverless applications, including cold starts and maximum execution limits.
  • Bref provides a way to run PHP applications on AWS Lambda, making it easy to deploy and scale PHP applications.
  • The PHP runtime for AWS Lambda is designed to be fast and lightweight, making it suitable for real-time applications.
  • There are potential drawbacks to using serverless applications, including cold starts and limitations on scalability.
  • Bref provides a way to run PHP applications on AWS Lambda, making it easy to deploy and scale PHP applications.
  • The PHP runtime for AWS Lambda is designed to be fast and lightweight, making it suitable for real-time applications.
  • There are potential drawbacks to using serverless applications, including cold starts and limitations on scalability.