Bref is 4 years old today!
▸ 118 contributors
▸ 118 releases
▸ 300 community members in Slack
▸ 3k downloads/day
▸ 1 billion requests processed each week
PHP + AWS Lambda = ❤️
I rewrote https://t.co/oQgoeAjhDt to Laravel!
(runs with Octane on @brefphp)
50% of requests under 5ms, p90 is 40ms 🚀
2.5M req/mo, costs: ~$2.5/mo + $11 for the database, staging costs $0
Open source on GitHub: https://t.co/PqHm58znGh
I have a Laravel app running serverless with @brefphp and generating PDF via chrome on Lambda.
I added X-Ray to visualize it:
1 - the HTTP route (Laravel controller) invokes the pdf function synchronously and passes it a URL to render
2 - the "pdf-renderer" function starts chromium, opens the URL, exports it to PDF, and uploads it to S3
3 - the HTTP route returns a temporary signed URL to the S3 file
This specific scenario is synchronous (~1s) because the PDF is live generated.
When possible the PDF is generated asynchronously in a Laravel job.
With that approach I write PDF templates with blade, it renders exactly the same locally or in Lambda (easy to test), never have to worry about scaling, and pay per PDF generated (about 0.004 cents/PDF)
Bref 3 is released 🎉
Since its creation, Bref has served 1.2 trillion requests and jobs!
▸ simpler & lighter runtimes
▸ PHP 8.5
▸ improved observability (logs & tracing)
▸ simpler Laravel onboarding
▸ postgres & redis built-in
and more ⤵
https://t.co/QOleQKoAs0
Improved Bref docs on a quick win: cleanup the AWS SDK before deployment
https://t.co/IB9PE56U1H
(btw could also be useful if you deploy your app on a server)
I created the Serverless Visually Explained course 6 years ago.
It's now free!
If you want concrete JS and PHP examples, with live animations, and no-bullshit explanations on what serverless is, you can click and read.
https://t.co/E3CnbWSJ1I
Application diagrams are live in Bref Cloud ✨
They'll help understand how serverless applications run in AWS:
- CloudFront CDN
- S3 for assets
- PHP runs on Lambda
- SQS queues…
Metrics are live: requests, latency, scaling, errors…
beautiful design by @nunowar!
NEXT MONDAY: PHP Portugal Meetup v16 🚨
📆 November 24, Lisbon, Portugal
💻 2 Talks by @matthieunapoli (creator of @brefphp) and TBH
🍕 Free snacks and drinks
🥇 Sponsors: @inscaleglobal and @laravelphp
REGISTER NOW: https://t.co/BbIuo2SVXj
I often get asked about the differences between serverless and containers/servers
I updated @brefphp docs to be much more upfront about what to expect to migrate to serverless.
Am I missing something? What's unclear?
That moment when you learn that one of the most well known and respected company on the internet uses Bref… but that they don't allow sharing the name 🥹