[{"data":1,"prerenderedAt":486},["ShallowReactive",2],{"project-33205282":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":35,"aspects":36,"strip":43,"post_text":46,"what":47,"said":93,"maker_in_thread":215,"shape":224,"grid":229,"attempts":446,"same_week":447,"maker_shows":45,"maker_hidden":478,"reader_version":479,"card":480},"33205282","FrankenPHP","An app server for PHP written in Go","title","Show HN: FrankenPHP, an app server for PHP written in Go","https:\u002F\u002Ffrankenphp.dev","frankenphp.dev","kdunglas",1665763197,2022,368,83,99,2570,4,"legend","infrastructure","application server","other",[24,25,26,27],"php app server","php worker mode","caddy php","php-fpm alternative","curious",0.092,{"positive":31,"neutral":32,"mixed":33,"critical":34},10,32,1,6,49,{"idea":37,"performance":39,"design":40,"execution":42},{"positive":18,"critical":38},2,{"positive":38,"critical":38},{"positive":33,"critical":41},0,{"positive":33,"critical":38},[44,41,41,41,41,41,33,45,45,45,44,45,45,45,33,45,45,45,45,45,45,45,45,44,33,44,45,44,45,45,33,41,41,41,45,45,45,44,44,41],5,3,null,{"problem":48,"audience":60,"pricing":46,"motivation":46,"time_to_build":46,"stack":69,"openness":91,"stage":92,"team_size":91},{"value":49,"source":50,"evidence":51},"Running PHP apps with PHP-FPM and nginx adds extra setup; FrankenPHP serves PHP from Caddy directly","commenter",[52,56],{"id":53,"by":54,"text":55},"33206640","mholt","With this you don't need FastCGI. FrankenPHP is simpler and less complex: just run it directly from your Caddy web server.",{"id":57,"by":58,"text":59},"33207031","fideloper","Removing php-fpm + nginx from a container sounds AMAZING to me. If I can just have one thing in a container (plus a code base), that would be a LOT simpler than: nginx, php-fpm,…",{"value":61,"source":62,"evidence":63},"PHP developers deploying web applications, especially in Docker","inferred",[64,65],{"id":57,"by":58,"text":59},{"id":66,"by":67,"text":68},"33207452","CoolCold","Short answer would be: sole solo developer experience (DX). Longer answer: avoiding infrastructure setup - for those who has infrastructure it makes no sense, for those who knows…",[70,77,81],{"value":71,"source":50,"evidence":72},"Go",[73],{"id":74,"by":75,"text":76},"33209732","francislavoie","C is necessary because PHP is written in C. So CGO is used to interface with PHP directly from Go, from a Caddy plugin. Docker is definitely not necessary, but it is the easiest…",{"value":78,"source":50,"evidence":79},"C (PHP interpreter via CGO)",[80],{"id":74,"by":75,"text":76},{"value":82,"source":83,"evidence":84},"Caddy","maker",[85,88],{"id":86,"by":54,"text":87},"33207499","I don't think this forks Caddy. Rather, it is a Caddy plugin: https:\u002F\u002Fgithub.com\u002Fdunglas\u002Ffrankenphp\u002Fblob\u002Fmain\u002Fcaddy\u002Fcaddy.go It uses mainline Caddy:…",{"id":89,"by":11,"text":90},"33208167","The approach isn't the same: Roadrunner executes php-cli and connects it to its web server through GRPC; FrankenPHP uses an ad-hoc SAPI, it is more like Apache's mod_php, the Go…","unknown","beta",{"praise":94,"objections":116,"requests":151,"questions":166,"alternatives":188},[95,100,109],{"value":96,"source":50,"evidence":97},"Simpler stack than nginx plus php-fpm in containers",[98,99],{"id":57,"by":58,"text":59},{"id":53,"by":54,"text":55},{"value":101,"source":50,"evidence":102},"Worker mode lowers latency versus php-fpm",[103,106],{"id":104,"by":75,"text":105},"33209768","FrankenPHP will perform better than php-fpm though, in worker mode, because it doesn't need to bootstrap fully on every request. In the conference slides, Kevin showed php-fpm…",{"id":107,"by":75,"text":108},"33211935","There's really not much to manage. It's not in any way a challenge, especially if you ship it as a Docker container. It's true it's probably not for everyone though; the worker…",{"value":110,"source":50,"evidence":111},"Early Hints support",[112,113],{"id":107,"by":75,"text":108},{"id":114,"by":54,"text":115},"33207444","Early Hints support was added to Caddy's proxy by Kevin Dunglas, the author of FrankenPHP. No fork required for Early Hints!",[117,125,136,140],{"value":118,"source":50,"evidence":119},"Worker mode needs apps that reset state; legacy apps may break",[120,124],{"id":121,"by":122,"text":123},"33212450","bdg","Just some experiences I've had putting large PHP frameworks into strange spaces: 1. Most PHP frameworks are designed to have all state destroyed at the end of a request. I was…",{"id":107,"by":75,"text":108},{"value":126,"source":50,"evidence":127},"Requires building a custom binary instead of standard releases",[128,132],{"id":129,"by":130,"text":131},"33211791","mekster","Hard to think this method takes off as people are reluctant to run their own binary that can't be updated with the rest of the system which in turn gives less users to report…",{"id":133,"by":134,"text":135},"33211711","mcpherrinm","Caddy plug-ins are statically compiled into the server. Generally you need to build your own binaries if you’re using plugins. There’s an official script, xcaddy, to make that…",{"value":137,"source":83,"evidence":138},"Experimental and not ready for production",[139],{"id":89,"by":11,"text":90},{"value":141,"source":50,"evidence":142},"Needs Docker or a C toolchain to build",[143,147],{"id":144,"by":145,"text":146},"33207381","calvinmorrison","typically I find CMake would do this, or Make, to verify dependencies. Coupled with a packaging system, like debian gives you, this is all pretty straightforward. I ran into this…",{"id":148,"by":149,"text":150},"33207353","TheRealPomax","When do things ever \"just compile\"? I assume the Docker image is because this is a pre-alpha and the docker image ensures that no one needs to go through hours of…",[152,159],{"value":153,"source":50,"evidence":154},"Benchmarks against mod_php, php-fpm and Swoole",[155],{"id":156,"by":157,"text":158},"33212893","NorwegianDude","Not really sure what the pros of this is. Simple to deploy in a docker image? Didn't know that was an issue. I guess performance also takes a hit, and that worker mode is a good…",{"value":160,"source":50,"evidence":161},"Laravel performance results",[162],{"id":163,"by":164,"text":165},"33206754","nonoesp","It'd be great to see how a Laravel app could run on FrankenPHP and see if there are speed gains. My current setup is a DigitalOcean Droplet with Nginx and php-fpm.",[167,174,181],{"value":168,"source":50,"evidence":169},"How does it differ from RoadRunner",[170],{"id":171,"by":172,"text":173},"33207843","abrztam","What is the difference between this and Roadrunner? It seems to do the same stuff. https:\u002F\u002Fgithub.com\u002Froadrunner-server\u002Froadrunner",{"value":175,"source":50,"evidence":176},"How it keeps code in memory across requests",[177],{"id":178,"by":179,"text":180},"33205965","timw4mail","So after looking at the slidedeck on the authors blog, I'm rather confused. How does FrankenPHP keep the code in memory if each request is in a separate memory space?",{"value":182,"source":50,"evidence":183},"Whether WordPress runs on it",[184],{"id":185,"by":186,"text":187},"33208643","bogdanu","Since it's not using PSR-7, does it mean that you could even run WordPress?",[189,197,201,208],{"value":190,"source":50,"evidence":191},"RoadRunner",[192,193],{"id":171,"by":172,"text":173},{"id":194,"by":195,"text":196},"33206065","nobleach","I've been watching how Go and Rust tooling has been finding its way into the JavaScript ecosystem. I've been out of the PHP realm for about 10 years but I did find RoadRunner for…",{"value":198,"source":50,"evidence":199},"Swoole",[200],{"id":156,"by":157,"text":158},{"value":202,"source":50,"evidence":203},"PHP-FPM with nginx or Caddy",[204],{"id":205,"by":206,"text":207},"33206611","tiffanyh","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.",{"value":209,"source":50,"evidence":210},"LiteSpeed PHP LSAPI",[211],{"id":212,"by":213,"text":214},"33207751","pbowyer","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). Litespeed's PHP LSAPI [1]…",{"comments":45,"answered":45,"key":216},[217,218,221],{"id":89,"text":90},{"id":219,"text":220},"33209148","I haven't tested it yet, but yes it's a stated goal.",{"id":222,"text":223},"33208207","Definitely! (using xcaddy and compiling PHP yourself, for now)",{"commenters":225,"max_depth":226,"maker_replies":45,"first_comment_mins":227,"lifespan_hours":228},61,7,44,247,[230,232,236,240,243,246,248,251,254,256,259,262,265,267,271,272,273,275,277,280,282,285,288,292,295,296,297,299,301,302,304,308,311,313,316,320,323,326,329,331,334,335,338,341,344,346,348,351,353,357,360,362,363,365,368,370,372,373,376,378,380,381,385,386,387,390,393,395,398,401,404,406,407,409,412,416,418,423,428,432,437,440,442],[212,41,44,231,213,41],"project\u002Fpositive\u002Fidea",[233,41,45,234,235,41],"33208359","project\u002Fneutral\u002Fperformance","apocalyptic0n3",[237,41,41,238,239,41],"33208556","commenter\u002Fneutral\u002Fnone","amq",[241,41,41,238,242,41],"33208626","jijji",[244,41,41,238,245,41],"33214172","lapser",[247,41,41,238,242,41],"33214395",[249,41,41,238,250,41],"33208878","xorcist",[252,41,41,238,253,41],"33211379","kijin",[255,41,41,238,250,41],"33222298",[257,41,41,238,258,41],"33209918","whenlambo",[260,41,41,238,261,41],"33212794","habibur",[263,41,41,238,264,41],"33212842","noduerme",[171,33,45,266,172,41],"project\u002Fneutral\u002Fidea",[268,33,33,269,270,41],"33207918","project\u002Fcritical\u002Fidea","floppydisc",[89,33,41,266,11,33],[185,33,45,266,186,41],[219,33,41,274,11,33],"project\u002Fneutral\u002Fnone",[121,33,45,276,122,41],"project\u002Fmixed\u002Fidea",[278,33,45,266,279,41],"33213698","mst",[281,33,41,238,122,41],"33215399",[283,33,44,231,284,41],"33323630","eyberg",[286,33,41,238,287,41],"33218540","rustatian-me",[289,38,45,290,291,41],"33206977","project\u002Fneutral\u002Fdesign","0xbadcafebee",[293,38,45,290,294,41],"33207231","mike_d",[114,38,45,290,54,41],[86,38,45,290,54,41],[298,38,45,290,291,41],"33207827",[222,38,41,300,11,33],"maker\u002Fneutral\u002Fnone",[133,38,45,290,134,41],[129,38,33,303,130,41],"project\u002Fcritical\u002Fexecution",[305,38,45,306,307,41],"33211852","project\u002Fneutral\u002Fexecution","ratorx",[309,38,45,306,310,41],"33207540","tomcam",[312,38,45,306,75,41],"33209645",[314,38,45,306,315,41],"33209311","chrsig",[317,38,41,318,319,41],"33210063","other\u002Fneutral\u002Fnone","philosopher1234",[321,45,41,318,322,41],"33224095","b_sanchez",[324,18,45,266,325,41],"33213597","p4bl0",[327,44,44,231,328,41],"33222681","borancar",[156,34,33,330,157,41],"project\u002Fcritical\u002Fperformance",[332,34,45,234,333,41],"33244413","sica07",[178,226,45,290,179,41],[336,226,45,234,337,41],"33206052","marcofatica",[339,226,45,234,340,41],"33206213","chx",[342,226,45,234,343,41],"33206188","kingkool68",[194,345,45,266,195,41],8,[347,345,45,290,58,41],"33207049",[349,345,41,318,350,41],"33209302","jedisct1",[352,345,41,318,195,41],"33224262",[354,355,44,231,356,41],"33205881",9,"seabrookmx",[358,31,41,318,359,41],"33207624","jeffersonheard",[205,361,33,269,206,41],11,[53,361,45,290,54,41],[57,361,44,364,58,41],"project\u002Fpositive\u002Fdesign",[366,361,45,290,367,41],"33209088","PlutoIsAPlanet",[104,361,44,369,75,41],"project\u002Fpositive\u002Fperformance",[371,361,33,330,130,41],"33211813",[107,361,44,369,75,41],[374,361,45,290,375,41],"33214188","nickjj",[377,361,45,290,58,41],"33223939",[379,361,41,238,375,41],"33224228",[66,361,45,266,67,41],[382,383,45,306,384,41],"33206994",12,"codegeek",[148,383,45,306,149,41],[144,383,33,303,145,41],[388,383,41,389,149,41],"33207543","commenter\u002Fneutral\u002Fexecution",[391,383,41,318,392,41],"33208715","andirk",[394,383,41,318,75,41],"33209740",[396,383,41,318,397,41],"33213637","tracker1",[399,383,41,238,400,41],"33231707","badcppdev",[402,383,41,318,403,41],"33212203","gocartStatue",[405,383,41,389,149,41],"33219388",[74,383,45,306,75,41],[163,408,45,234,164,41],13,[410,408,41,318,411,41],"33206881","some_developer",[413,414,45,300,415,41],"33206224",14,"simlevesque",[417,414,41,238,75,41],"33209788",[419,420,44,421,422,41],"33207405",15,"maker\u002Fpositive\u002Fnone","treahauet",[424,425,44,426,427,41],"33206025",16,"project\u002Fpositive\u002Fnone","green-salt",[429,430,44,431,340,41],"33206232",17,"project\u002Fpositive\u002Fexecution",[433,434,41,435,436,41],"33207506",18,"other\u002Fcritical\u002Fidea","k__",[438,434,41,318,439,41],"33207675","mhd",[441,434,41,318,122,41],"33212575",[443,444,41,318,445,41],"33207491",19,"password4321",[],[448,453,458,463,468,473],{"id":449,"name":450,"points":451,"category":452},"33217395","America",663,"games",{"id":454,"name":455,"points":456,"category":457},"33251954","Swurl",572,"web_saas",{"id":459,"name":460,"points":461,"category":462},"33261494","Palette",472,"ai",{"id":464,"name":465,"points":466,"category":467},"33248488","Linen",292,"productivity",{"id":469,"name":470,"points":471,"category":472},"33228533","screenplays",266,"learning_science",{"id":474,"name":475,"points":476,"category":477},"33226817","Carefulwords.com",258,"languages",false,"v2",{"id":481,"name":5,"line":6,"ai":478,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":482,"top":18,"kw":483,"maker":11,"domain":10,"tier":19,"attempts":41,"strip":484,"url":9,"mix":485,"praise":96,"objection":118,"sub":21},33205282,0.09,[24,25,26,27],"5000001333533313333333351535331000333550",[31,32,33,34],1793991053111]