Re:Running PHP fast at the edge with WebAssembly
by afavour on Thursday May 23, 2024 @02:55PM
(#40458464)
The post mentions a cache. I think the key here would be not going to the central DB and instead going to a distributed cache. Not an unreasonable concept when I assume the vast majority will be read operations.
[ Parent
| on HN ]
Re:Running PHP fast at the edge with WebAssembly
by Y-bar on Thursday May 23, 2024 @02:57PM
(#40458492)
That's OPcache they mentioned, a specific language-level cache native to PHP.
Re:Running PHP fast at the edge with WebAssembly
by afavour on Thursday May 23, 2024 @03:05PM
(#40458612)
Ah. Point still stands though, distributed storage is what really unlocks this concept.
Wordpress is a pretty bad example though, surely you’d just CDN cache the pages!
Re:Running PHP fast at the edge with WebAssembly
by iruoy on Thursday May 23, 2024 @03:44PM
(#40459044)
opcache doessn't cache user data. it's for caching bytecode in memory as long as the php script/server is running
i'd like to see a comparison against a firecracker vm and a docker container
Re:Running PHP fast at the edge with WebAssembly
by fhuici on Friday May 24, 2024 @08:30AM
(#40465502)
Hi, on kraft.cloud we use FC, along with a custom controller and very specialized VMs (unikernels) to have extremely efficient deployments (eg, millisecond cold starts). For a PHP web server, for instance, we can cold start things in about 30ms (https://docs.kraft.cloud/guides/php/). It's also possible to run wasm workloads/blobs (e.g., https://docs.kraft.cloud/guides/wazero/).
The builds are based on Dockerfiles, but for deployment we transparently convert that to unikernels.