TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: FrankenPHP, an app server for PHP written in Go

368 pointsby kdunglasover 2 years ago

20 comments

pbowyerover 2 years ago
Good. PHP-FPM needs a challenger as anyone who has tried to debug it or its pools knows. Or to tune it (so many modes, so many configuration options).<p>Litespeed&#x27;s PHP LSAPI [1] shows how good performance can be with other setups. It&#x27;ll be great if FrankenPHP gets to the same state.<p>1. <a href="https:&#x2F;&#x2F;www.litespeedtech.com&#x2F;open-source&#x2F;litespeed-sapi&#x2F;php" rel="nofollow">https:&#x2F;&#x2F;www.litespeedtech.com&#x2F;open-source&#x2F;litespeed-sapi&#x2F;php</a>
评论 #33208359 未加载
abrztamover 2 years ago
What is the difference between this and Roadrunner? It seems to do the same stuff.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;roadrunner-server&#x2F;roadrunner" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;roadrunner-server&#x2F;roadrunner</a>
评论 #33208167 未加载
评论 #33207918 未加载
0xbadcafebeeover 2 years ago
So it&#x27;s mod_php for Caddy, in reverse?<p>The traditional idea is to build a plug-in for the parent webserver. By essentially &quot;making a fork&quot; of Caddy, if you want to add other plugins to Caddy and then incorporate them into FrankenPHP, it&#x27;s a lot more work. If instead you ship a PHP plugin to Caddy, you can manage Caddy instead and mix and match different functionality in one place.<p>But I guess it&#x27;s heretical to suggest somebody use plugins in Go, if the whole idea is everything is a static binary.
评论 #33207499 未加载
评论 #33207231 未加载
评论 #33207540 未加载
评论 #33209311 未加载
b_sanchezover 2 years ago
I was in the conference (20221014, afup 2022), where frankenphp was released live. The conference was really interesting and answer many (if not all) of the questions raised in comments.<p>I&#x27;v checked and unfortunately the video recording is not available for now, I will post a link here as son as available.
p4bl0over 2 years ago
If I understand it correctly the idea of worker mode is to have a persistent application running where you can have the same objects in memory from one request to another rather than relaunching the app from scratch (requiring files, constructing objects, fetching data from some database) again for each request.<p>Is that it?
borancarover 2 years ago
This is amazing, and way more advanced than what was there. Going to definitely use it on the next project.<p>Previously, there was <a href="https:&#x2F;&#x2F;github.com&#x2F;deuill&#x2F;go-php" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;deuill&#x2F;go-php</a> which was PHP5 and PHP7, but you needed to build PHP with ZTS. I had to forke it to focus on PHP5 and bring some improvements - my primary goal was to port some legacy PHP over iteratively via the Strangler pattern. If it can still be useful to some, the fork is here - <a href="https:&#x2F;&#x2F;github.com&#x2F;borancar&#x2F;go-php" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;borancar&#x2F;go-php</a>
NorwegianDudeover 2 years ago
Not really sure what the pros of this is. Simple to deploy in a docker image? Didn&#x27;t know that was an issue. I guess performance also takes a hit, and that worker mode is a good amount slower than Swoole?<p>Some benchmarks against mod_php, nginx+php-fpm and swoole would be nice.
评论 #33244413 未加载
timw4mailover 2 years ago
So after looking at the slidedeck on the authors blog, I&#x27;m rather confused. How does FrankenPHP keep the code in memory if each request is in a separate memory space?
评论 #33206052 未加载
评论 #33206188 未加载
nobleachover 2 years ago
I&#x27;ve been watching how Go and Rust tooling has been finding its way into the JavaScript ecosystem. I&#x27;ve been out of the PHP realm for about 10 years but I did find RoadRunner for PHP at one point. That&#x27;s also an app server written in Go I believe. I wonder how this compares.
评论 #33207049 未加载
评论 #33209302 未加载
评论 #33210081 未加载
seabrookmxover 2 years ago
So.. it&#x27;s like gunicorn (pre-fork web server) but for PHP and built on top of Caddy?<p>Looks neat!
jeffersonheardover 2 years ago
If this isn&#x27;t pronounced Frankenphip I will be disappointed.
tiffanyhover 2 years ago
I might be missing the obvious but why would you add extra complexity to your infrastrucutre setup when PHP can be run natively from within caddy, apache, nginx via fastcgi.
评论 #33207031 未加载
评论 #33206640 未加载
评论 #33207452 未加载
codegeekover 2 years ago
I see a bit of C as well ? Also, do we need to use Docker ? I am very interested in trying but wanted to check.<p>If it is Go, can I not just compile the binary and execute ?
评论 #33209732 未加载
评论 #33207353 未加载
nonoespover 2 years ago
It&#x27;d be great to see how a Laravel app could run on FrankenPHP and see if there are speed gains.<p>My current setup is a DigitalOcean Droplet with Nginx and php-fpm.
评论 #33206881 未加载
simlevesqueover 2 years ago
Félicitation !<p>Do you have any success story with this application server ?
评论 #33209788 未加载
treahauetover 2 years ago
Congratulations! This looks neat!
green-saltover 2 years ago
I&#x27;ll have to try this out!
chxover 2 years ago
Looking at the forked PHP source <a href="https:&#x2F;&#x2F;github.com&#x2F;php&#x2F;php-src&#x2F;compare&#x2F;master...dunglas:php-src:frankenphp-8.2" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;php&#x2F;php-src&#x2F;compare&#x2F;master...dunglas:php-...</a> I do not expect compatibility issues.
评论 #33207840 未加载
k__over 2 years ago
PHP is already FrankenPerl, and Perl FrankenAwk?<p>What happened to the times where some crazy person would simply slap together an interpreter and call it a language?<p>Somehow, language creation got more and more sophisticated these days.
评论 #33207675 未加载
评论 #33212575 未加载
评论 #33208424 未加载
password4321over 2 years ago
PHP in .NET: <a href="https:&#x2F;&#x2F;www.peachpie.io" rel="nofollow">https:&#x2F;&#x2F;www.peachpie.io</a>
评论 #33208435 未加载