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.

A bank runs serverless with PHP and AWS Lambda

111 pointsby mnapoliover 1 year ago

21 comments

willsmith72over 1 year ago
I always love a story about a successful strangler pattern migration.<p>I do wonder how they came to Lambda though. I love it for small workloads and highly variable demand services, but something like Treezor you&#x27;d think has relatively flat and high demand. The cloud cost for Lambda would be much higher than running the equivalent compute, even with something also highly scalable like ECS.
评论 #38099363 未加载
评论 #38106721 未加载
评论 #38106438 未加载
评论 #38100391 未加载
评论 #38099819 未加载
评论 #38100865 未加载
joshstrangeover 1 year ago
I&#x27;d really like to play with Bref but it more or less requires using serverless framework from what I understand as there are no guides on how to get it working with something like SST. I&#x27;ve used serverless framework before and I won&#x27;t touch it again. It seems like a complete dead end with the team behind it more or less giving up on it to go work on a cloud backend alternative to lambda&#x2F;etc. Docs were a mess, lot&#x27;s of half-implemented things, etc.<p>I wouldn&#x27;t lift-and-shift the PHP app I work on, it requires too many FreeBSD-specific&#x2F;custom underlying services but I could make use of lambda for certain tasks while leveraging the PHP code we already have. We use SST for for some NodeJS (TypeScript) lambdas that have been very popular but PHP isn&#x27;t going anywhere in our stack so I&#x27;d love to find a way to move the bursty parts of it to lambda.
评论 #38099997 未加载
评论 #38100322 未加载
mikeceover 1 year ago
I don&#x27;t know which surprises me more: that they continued to use PHP in their move to serverless&#x2F;microservices or that nobody else on HN has questioned this point yet. I totally get <i>why</i> they would keep PHP: they have the language&#x2F;platform experience already and AWS supports it (which is really more than enough to silence the &quot;You should have switched to {other_language}!&quot; partisans). Plus, I imaging non-trivial amounts of copy &amp; paste of proven functions was key to moving from monolith to Lambdas... why change the code if it works?
评论 #38099501 未加载
评论 #38099638 未加载
评论 #38099516 未加载
评论 #38099648 未加载
评论 #38099597 未加载
greatgibover 1 year ago
Treezor is not really directly a bank but more a &quot;bank as a service&quot; company.<p>Lots of companies or &quot;neobank&quot; that want to offer a kind of bank account, for personal or corporate use, but that don&#x27;t have an official banking agreement, and not really a banking infrastructure, can use them as &quot;white label&quot; solutions.<p>All the bank accounts and banking operations will be done by treezor, but from the user point of view, he will only interact with the company and company frontend, and almost never see that it is Treezor that is operating in the background.<p>That being said, I don&#x27;t know if their &quot;serverless&quot; move is a good one, because their solution is commonly known to be unreliable, and I think a lot of customers would be happy to go to another provider if it was possible.
评论 #38106274 未加载
Implicatedover 1 year ago
I&#x27;ve been elbow deep in PHP for well over a decade, and I was genuinely surprised when I first saw this on Twitter. (Insert swaggy p meme here)<p>I have immense respect for the author, but I&#x27;m perplexed about the decision to build a bank on this stack.<p>Especially considering that the person who created Laravel Vapor (a serverless Laravel service) has since discussed the advantages of moving a large project from Lambda to EC2 (<a href="https:&#x2F;&#x2F;twitter.com&#x2F;themsaid&#x2F;status&#x2F;1716844479817154589" rel="nofollow noreferrer">https:&#x2F;&#x2F;twitter.com&#x2F;themsaid&#x2F;status&#x2F;1716844479817154589</a>).<p>I really do wonder what the bullet points of pros&#x2F;cons in choosing to go serverless for something like this were.
评论 #38101005 未加载
padjoover 1 year ago
&gt; The migration to microservices is still an ongoing work.<p>Ain’t that always the way
评论 #38103892 未加载
idlewordsover 1 year ago
A more accurate title here is &quot;bank moves PHP app to Amazon servers&quot;
AndrewDuckerover 1 year ago
I&#x27;d love to know how much the cost changed.
jackconsidineover 1 year ago
Love a good lift-and-shift. I wish bref was this well-supported about 3-5 years ago. At that point I was trying to move some PHP services over to serverless. I think I remember seeing bref but it didn&#x27;t appear to have the clout then. I even think Laravel Vapor didn&#x27;t use bref when they were setting up PHP runtime configurations etc
ThinkBeatover 1 year ago
&quot;&quot; Treezor is an independent provider of outsourcing and white label solutions for electronic payments. &quot;&quot; <a href="https:&#x2F;&#x2F;www.crunchbase.com&#x2F;organization&#x2F;treezor" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.crunchbase.com&#x2F;organization&#x2F;treezor</a><p>So, is this a payment processor much like Stripe?
Fischgerichtover 1 year ago
Wow, that is just amazing.<p>So it means that if I connect to treezor.com, I am not talking to a server, but it&#x27;s direct communication with god in heaven?<p>And it&#x27;s not a badly configured server, but the Content &quot;Security&quot; Policy allowing FOURTY different sites, including unsafe inlines (!) is beamed into my brain from a different universe?<p>And the PHP &quot;software&quot; also clearly is running on a server, because PHP isn&#x27;t a server-side scripting language, it&#x27;s all happening in your mind!<p>&#x2F;s<p>Hint: The whole point of a bank is BEING a server, be a central trusted authority accepting and executing transactions from and between clients. A serverless bank is a bank that no longer exists, but got replaced by peer-to-peer transactions.
评论 #38107538 未加载
allan_sover 1 year ago
at Rosaly.com we&#x27;ve been using bref since 2021 and we&#x27;re extremly happy with it, even if we&#x27;ve stopped to the php-fpm integration. We haven&#x27;t seen a reason yet to move out of the monolith and bref.sh allow us to have the best of both world (php + lambda )<p>1. we&#x27;re a small team and we want to manage as less infra as possible 2. with their &quot;dev mode&quot; docker images, we can a local version which replicate 99% of the production environment (same runtime, same readonly filesystems etc.) 3. deploying is as simple as doing a zip , uploading to s3, and calling lambda update. 4. we have cronjobs with cloudwatch , Symfony&#x27;s Command.
herpderperatorover 1 year ago
I feel like the naming of the bank (Treezor) is slightly unfortunate since it&#x27;s so close to the &quot;Trezor&quot; bitcoin hardware wallet...
评论 #38099812 未加载
评论 #38100009 未加载
评论 #38099703 未加载
agentultraover 1 year ago
Curious if they have spikey latency from cold starts? The authorization calls have a time budget but it&#x27;s pretty generous so maybe a nothing-burger there? How do they keep authorization context fresh enough for the lambda performing it?<p>Also... what has the bill been like? I&#x27;ve used Lambda for side-car data migration projects but I&#x27;d be surprised if it saved money over a beefy co-located or cloud server if your volume is generally constant.
witnesser2over 1 year ago
There was once upon a time a discussion about bank&#x2F;finance software system. You have to keep long history of audit records &#x2F; logs. It is difficult to peruse such consideration here with the database ballooned to the cloud.
评论 #38100488 未加载
solardevover 1 year ago
I wonder why they went with AWS Lambda and PHP instead of something serverless-native like Cloudflare Workers? I guess they still have some critical parts of the legacy stack on AWS (DBs especially, but also other AWS services).<p>I wonder if you can build something like this entirely greenfield today, like what you&#x27;d use as a permanent data store for all the transactions, without having to manage the scaling of each individual microservice. Would CF Workers + Durable Objects be able to handle something like that?
评论 #38100553 未加载
评论 #38100219 未加载
jherikoover 1 year ago
banks have low requirements with no technical challenges...<p>im honestly amazed how bad almost every bank service is with their tech usage... and this has been true for all of my living memory.<p>i might have to look into these guys... maybe i can have a service thats only millions of times worse than i expected as a child, instead of trillions of times worse
swingingFlyFishover 1 year ago
Where&#x27;s the database staying on? You migrated to AWS RDS or it&#x27;s elsewhere?
neatzeover 1 year ago
In second part (Refactoring to serverless microservices) where is database in there ?
评论 #38099818 未加载
GaelFGover 1 year ago
I have no clues about what&#x27;s better but as a french I&#x27;m amazed by the idea to delegate banking operations to a cloud provider. Last time I worked in bank IT political requirement and good practices were using their own private physical network infrastructure over all the country and data storage server rooms were literally bunkers with armed security.<p>Is it that common around the world and &#x27;we&#x27; just happen to have been overkill on security or do they are not really a true &#x27;bank&#x27; and more a payment provider ?<p>that seems such a change from some years ago were cost were totally the last of the issues against security.
评论 #38100402 未加载
评论 #38100350 未加载
评论 #38100328 未加载
评论 #38103414 未加载
评论 #38100717 未加载
评论 #38100204 未加载
评论 #38104232 未加载
评论 #38101273 未加载
评论 #38106369 未加载
marcus0x62over 1 year ago
&gt; In October 2021, they successfully migrated their first API route to AWS Lambda, the most critical one handling all live credit card transactions. Over the following year, more and more API endpoints were migrated away from the servers to AWS Lambda.<p>Why? Why do people insist on doing this? Move something less important first, prove you can operate in production, then move the crown jewels.
评论 #38105909 未加载
评论 #38106364 未加载