In order to try FrankenPHP and increase service isolation, we decided to split our API service off of
our monolithic EC2 instances. (The instances carry several applications side-by-side with PHP-FPM, and use
Apache to route to the applications based on the Host header. Each app is not supposed to meddle in the
neighbor’s affairs, but there’s no technical barrier there.)
I finally got a working deployment, and I learned a lot along the way. The documentation was a bit scattered, and searching for the error messages nearly useless, so I wanted to pull all of the things that tripped me up together into a single post. It’s the Swiss Cheese Model, except that everything has to line up for the process to succeed, rather than fail.
- Networking problems
- ‘Force Redeployment’ is the normal course of operation
- The health check is not optional
- Logs are obscured by default
- The ports have to be correct (Podman vs. build args)
- The VPC Endpoint for an API Gateway “Private API” is not optional
- There are many moving parts
Let’s take a deeper look.