so that's a bit of self promotion but we launched /dev/null as an open-source social network for devs recently (e.g. https://dev-null.sh/@laravel) not sure if there's something to do here
I don't understand why things aren't faster, for Bref I recompiled everything from scratch for PHP 8.2 to 8.5, for ARM and x86, and 2 different major versions, and published to Docker Hub + ~20 AWS regions. It took me 30 minutes to have all the releases out.
Though I have to say I prewarmed Docker caches in advance and use Depot, which accelerated things for sure.
Login is via GitHub, that helps a little bit. And if there is spam, it won't impact official RFC votes anyway (it's completely separate) so there's no direct impact on #internals.
externals now syncs RFCs and has the same upvote/downvote system as #internals threads.
That allows the community to express interest into specific RFCs, and lets you follow RFCs and find their related discussions on #internals.
I'm open to feature requests. Now that I rewrote externals.io to Laravel development is super easy. I'm currently looking into a notification system (to follow specific threads or RFCs) for example.
Sadly I'm 38 and everyday closer to death. My personal path is that I enjoy simple infrastructure and don't want to maintain servers or containers (so of course I chose to be the guy that maintains a PHP runtime for others 😂 I didn't think this through)
Just to provide some context, a $50k surprise invoice is ~10 billion requests (order of magnitude, not exact number) if we talk an HTTP app.
To receive that in a night/a day or so and not catch it, it means
- DDoS protection from Cloudfront or Cloudflare completely missed those (Cloudfront plans prevent you from DDoS & related costs)
- the cost alert you set up didn't work
- if this was over 48h it would be ~60k requests per second continuously -> any metric alert didn't flare up
- your functions scaled to ~12,000 instances continuously, which means you explicitly allowed them to scale that high and asked AWS for higher limits
- the default limit is 10 concurrent instances (you can increase it)
- AWS probably would notice it and block the traffic before you to be realistic
- also you would have to have increased quotas for API Gateway
I'm not saying I don't understand the fear, I do (and AWS is finally improving at adding limits and protections). But it's useful to look at actual numbers to put them into perspective.
I mentioned redundancy and scaling. One VPS doesn't have redundancy.
As for scaling, will you be behind your screen upgrading the VPS when you need to go from 0 to 1000 queue workers because a huge batch landed? Or will you pay for an enormous instance running all month long?
I understand it doesn't fit _every_ use case, but you can't say that autoscaling and redundancy are not real problems for some people.
Absolutely (though tbf I do host some websites for $0 on Lambda).
The way I like to position it is "when you need to go from 1 to N". I.e. 1 server to N servers (or containers). That could be to scale horizontally or have redundancy.
At this point you need to move beyond "get a VPS and deploy on it". Serverless is one option (amongst others) for this when you don't want to learn/manage K8s (and similar) and scale without thinking about limits. I.e. "how many servers do you need, how much RAM, how much CPU, do you need separate servers/containers for queues, if so how many, etc" All these questions just go away.
Not for every project, just like a VPS isn't for every project.
I'm also working on a self-hosted version of the bref cloud dashboard with extension points to make it customizable for power users. Shoot me an email (matthieu at bref) or send me a DM on slack (https://bref.sh/slack).
Ha appreciate you sharing, I got a notification from Plausible about a traffic spike and figured it would be Reddit ^^
To be fair v3 is from earlier this year, I'm already looking into v4 (for EOY). As usual, very minimal breaking changes/easy upgrade, but my plan is:
- more standard stack (Debian, containers…), less "special"
- removing more limits/weirdness from AWS Lambda (e.g. deploy size limits, response streaming, etc)
- performance improvements (less cold starts, and faster)
- simpler way to support more PHP extensions
Some of these points are vague because I can't share exact details of how it's possible for now. But if all goes well, Bref v4 should be big in terms of making serverless "even more standard" and boring tech.
Yeah I'm not sure that's impossible, but it means Herd (the process itself) must run decryption before starting PHP-FPM. I'm not sure if there are hooks or if Herd is extensible?
> It encrypts the whole .env into .env.encrypted meant to be committed and decrypted on deploy. It solves prod secrets, not your local machine: to use it you run env:decrypt, and the plaintext .env is back on disk. Dotlock encrypts value by value, keeps the names readable, and the decrypted values only ever exist in process memory.
My package requires a passphrase to decrypt the secrets, and then they are never stored on disk. That considerably reduces the risks.
"then a process on your machine can still get them." -> that's the point, no it can't
I tried to make it more readable, with the active RFCs on the home page… and emoji reactions on all emails now!
Thank you for getting the work started!
so that's a bit of self promotion but we launched /dev/null as an open-source social network for devs recently (e.g. https://dev-null.sh/@laravel) not sure if there's something to do here
I don't understand why things aren't faster, for Bref I recompiled everything from scratch for PHP 8.2 to 8.5, for ARM and x86, and 2 different major versions, and published to Docker Hub + ~20 AWS regions. It took me 30 minutes to have all the releases out.
Though I have to say I prewarmed Docker caches in advance and use Depot, which accelerated things for sure.
This is cool! I assume this kind of app needs to go through the validation cycle of Android and Apple so takes days to release?
Login is via GitHub, that helps a little bit. And if there is spam, it won't impact official RFC votes anyway (it's completely separate) so there's no direct impact on #internals.
externals now syncs RFCs and has the same upvote/downvote system as #internals threads.
That allows the community to express interest into specific RFCs, and lets you follow RFCs and find their related discussions on #internals.
I'm open to feature requests. Now that I rewrote externals.io to Laravel development is super easy. I'm currently looking into a notification system (to follow specific threads or RFCs) for example.
I explored another approach: running Rust inside of PHP: https://x.com/matthieunapoli/status/2109309533558657246
https://preview.redd.it/lf1cn7but8vh1.png?width=1970&format=png&auto=webp&s=28ad36e216fb0ebc7cb8656223575efee463c1fb
I've started publishing some of my skills here: https://github.com/mnapoli/skills
Fair then! Claude tells me ~3k DAU could be about 13M backend requests. That would be (rough estimate) $50/mo, excluding the database.
So we're close to the $100 price point!
Thank you for sharing, that's always interesting to compare real numbers!
Thanks! Are those monthly active users or daily active users? I'm trying to understand if that means 1 million requests to Laravel or like 50 million.
Sadly I'm 38 and everyday closer to death. My personal path is that I enjoy simple infrastructure and don't want to maintain servers or containers (so of course I chose to be the guy that maintains a PHP runtime for others 😂 I didn't think this through)
I'm curious to do a price comparison, what is the traffic you handle with this server? And you don't need redundancy for this project I understand?
Just to provide some context, a $50k surprise invoice is ~10 billion requests (order of magnitude, not exact number) if we talk an HTTP app.
To receive that in a night/a day or so and not catch it, it means
- DDoS protection from Cloudfront or Cloudflare completely missed those (Cloudfront plans prevent you from DDoS & related costs)
- the cost alert you set up didn't work
- if this was over 48h it would be ~60k requests per second continuously -> any metric alert didn't flare up
- your functions scaled to ~12,000 instances continuously, which means you explicitly allowed them to scale that high and asked AWS for higher limits
- the default limit is 10 concurrent instances (you can increase it)
- AWS probably would notice it and block the traffic before you to be realistic
- also you would have to have increased quotas for API Gateway
I'm not saying I don't understand the fear, I do (and AWS is finally improving at adding limits and protections). But it's useful to look at actual numbers to put them into perspective.
I mentioned redundancy and scaling. One VPS doesn't have redundancy.
As for scaling, will you be behind your screen upgrading the VPS when you need to go from 0 to 1000 queue workers because a huge batch landed? Or will you pay for an enormous instance running all month long?
I understand it doesn't fit _every_ use case, but you can't say that autoscaling and redundancy are not real problems for some people.
Absolutely (though tbf I do host some websites for $0 on Lambda).
The way I like to position it is "when you need to go from 1 to N". I.e. 1 server to N servers (or containers). That could be to scale horizontally or have redundancy.
At this point you need to move beyond "get a VPS and deploy on it". Serverless is one option (amongst others) for this when you don't want to learn/manage K8s (and similar) and scale without thinking about limits. I.e. "how many servers do you need, how much RAM, how much CPU, do you need separate servers/containers for queues, if so how many, etc" All these questions just go away.
Not for every project, just like a VPS isn't for every project.
I guess this guide became even more relevant now.
Feel free to roast that guide, that will be the opportunity for me to improve it.
I won't promise the migration of the 300 apps is easy, but if you want to stay on Lambda with the current infrastructure there's Bref (https://bref.sh/docs/laravel/migrating-from-vapor).
I'm also working on a self-hosted version of the bref cloud dashboard with extension points to make it customizable for power users. Shoot me an email (matthieu at bref) or send me a DM on slack (https://bref.sh/slack).
Thank you I've pushed a fix
Ha appreciate you sharing, I got a notification from Plausible about a traffic spike and figured it would be Reddit ^^
To be fair v3 is from earlier this year, I'm already looking into v4 (for EOY). As usual, very minimal breaking changes/easy upgrade, but my plan is:
- more standard stack (Debian, containers…), less "special"
- removing more limits/weirdness from AWS Lambda (e.g. deploy size limits, response streaming, etc)
- performance improvements (less cold starts, and faster)
- simpler way to support more PHP extensions
Some of these points are vague because I can't share exact details of how it's possible for now. But if all goes well, Bref v4 should be big in terms of making serverless "even more standard" and boring tech.
Comments are stored locally in a file, wouldn't be easy to share it as-is.
Yeah I'm not sure that's impossible, but it means Herd (the process itself) must run decryption before starting PHP-FPM. I'm not sure if there are hooks or if Herd is extensible?
That's mentioned in the README: https://github.com/mnapoli/dotlock#alternatives
> It encrypts the whole
.envinto.env.encryptedmeant to be committed and decrypted on deploy. It solves prod secrets, not your local machine: to use it you runenv:decrypt, and the plaintext.envis back on disk. Dotlock encrypts value by value, keeps the names readable, and the decrypted values only ever exist in process memory.What do you mean?
My package requires a passphrase to decrypt the secrets, and then they are never stored on disk. That considerably reduces the risks.
"then a process on your machine can still get them." -> that's the point, no it can't
I haven't, thanks for the idea!
That sounds interesting, but in the end `cat .env` works, so how is that protecting against a process reading the filesystem?
E.g. if I have many projects on my laptop, if one gets "compromised" (e.g. one bad NPM/Composer package) I don't want all my projects secrets to leak.