Selfhosted
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil.
-
No spam.
-
Posts are to be related to self-hosting.
-
Don't duplicate the full text of your blog or readme if you're providing a link.
-
Submission headline should match the article title.
-
No trolling.
-
Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.
-
AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
view the rest of the comments
I don't know a lot about fastcgi, but looking it up it seems like it also keeps a persistent process running to avoid execution overhead, but I don't know how that process is managed π€·ββοΈ
Either way, you could use a supervisor of sorts that shuts down the process/container after some idle time (at least for containers I know some exist) and that should probably work fine (outside of interrupting scanning operations).
I haven't tried it myself yet though :)
More of less, the good thing about PHP + fastcgi is that it keeps a configure amount of minimum persistent processes (plus a dynamic number) to avoid execution overhead like you said... now there's an important detail, PHP processes are generic, meaning if you've 50 apps hosted in your server they can all be served with just one persistent process. No need to spin up 50 processes for each app like with node/go etc.
Supervisors shutting down containers/processes are good, but starting up is slow compared to the single PHP idle process ready to go for any app. :)
Thanks for the explanation, makes sense! This app relies quite heavily on in-memory caches, so it's somewhat incompatible with that model :)
That said, I wonder if the startup time would be noticeable. Depends a lot on the configuration, but it shouldn't take more than a few 100ms (esp. if you use skip_collection_counts).
Not really incompatible, PHP provides configurable shared memory across processes that survive even if fastcgi releases every process and just keeps something idle for new requests.
Oh interesting! Thanks for explaining :)