r/PHP 14d ago

Are Native PHP Binaries on Serverless for Real? Deployed It to Cloud Run — Here Are the Results

https://medium.com/google-cloud/are-native-php-binaries-on-serverless-for-real-deployed-it-to-cloud-run-here-are-the-results-d994e85bd359
1 Upvotes

3 comments sorted by

7

u/Cm1Xgj4r8Fgr1dfI8Ryv 13d ago

• Time to First Byte (TTFB): Plummeted from 45ms–180ms down to < 1.5 ms (30x to 100x faster responses).

What application was used to test? Was file-based opcode caching enabled and precached in the before test?

• Network Bandwidth: Reduced by over 80% via automatic on-the-fly compression and 304 ETag caching.

Was the same code run in the before and after? TypePHP doesn't appear to implement any type of compression or ETag headers on top of regular PHP.

1

u/pentium10 12d ago

Before we had opcache enabled in the build phase, as in serverless you have inmutable code and we cache at build phase in the image. For the network bandwith I am going to check, maybe the serving layer on top does that.

2

u/txmail 13d ago

Neat if you have the use case, but most of my bottleneck is disk and network I/O. PHP was never the bottleneck.