Live data from Hacker News

A bank runs serverless with PHP and AWS Lambda

bref.sh

51–60 of 132 posts

Re: A bank runs serverless with PHP and AWS Lambda

#51

Earlier quoted context omitted.

As you can see on the website ( https://bref.sh/ ) there's 13 billion monthly AWS Lambda invocations using Bref (PHP).

That doesn't really say much. Isn't the whole point of serverless to support high-volume, individually-inexpensive, invocations? For context, 13B is like roughly a $2000 (edit: more like $4000, sorry) spend on Cloudflare Workers, similar cost (harder to calculate but ballpark similar) on Lambda. That could be a single company spending the bulk of that. (Further edit: Lambda pricing is way off too. See reply below.)

That ballpark is not even close to the park. My company spends ~$500/month on AWS Lambda and we're doing about 2M/req/day with Bref. There's still 12B 940M requests to account for

Re: A bank runs serverless with PHP and AWS Lambda

#52

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). I wonder if you can build something like this entirely greenfield today, like what you'd use as a permanent data store for all the transactions, without having to manage the scaling of each i…

DynamoDB as a data store for transactions works just fine, as long as you are aware of the trade-offs and design a good data model.

Sorry, I didn't mean that as a challenge to AWS, just wondering what the pros/cons/tradeoffs are to each approach.

Re: A bank runs serverless with PHP and AWS Lambda

#53
post #28

I have no clues about what's better but as a french I'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. Is it that common around the world and 'we' just happen to have be…

Which bank was that? As someone living in France, I bank with one of the "big banks" and even though I have no idea how their internal networks are laid out, I can't help but shake my head in disbelief whenever they send me an SMS to confirm some operation "for my security". Think adding a new transfer beneficiary, making a "large" bank transfer, or paying online with my credit card. The SMS doesn't even have all the details of the operation. It's something like "are you trying to pay X €?". No word to whom, from where, etc.

This isn't a step up from "nothing", mind. Initially, I used to have some kind of OTP fob for paying online. They then moved to SMS. Then to their app attached to my iphone. Now, back to SMS. I still have the app installed on the same iphone, and I use it regularly.

Re: A bank runs serverless with PHP and AWS Lambda

#54
post #28

I have no clues about what's better but as a french I'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. Is it that common around the world and 'we' just happen to have be…

It's way worse than you think. A large number of Swiss banks including Swiss banking regulators store all their data on Google Cloud.

A lot of swiss government data is also stored in AWS, made a few headlines during covid because we "delegate our data to the americans"

Re: A bank runs serverless with PHP and AWS Lambda

#55

Earlier quoted context omitted.

That doesn't really say much. Isn't the whole point of serverless to support high-volume, individually-inexpensive, invocations? For context, 13B is like roughly a $2000 (edit: more like $4000, sorry) spend on Cloudflare Workers, similar cost (harder to calculate but ballpark similar) on Lambda. That could be a single company spending the bulk of that. (Further edit: Lambda pricing is way off too. See reply below.)

That ballpark is not even close to the park. My company spends ~$500/month on AWS Lambda and we're doing about 2M/req/day with Bref. There's still 12B 940M requests to account for

Thank you, and sorry about that!

How come Lambda is so expensive for you?

At 13000M invocations/mo, that's $2600 in requests. Is it the GB-seconds duration charge that get you?

Re: A bank runs serverless with PHP and AWS Lambda

#56

Earlier quoted context omitted.

It's way worse than you think. A large number of Swiss banks including Swiss banking regulators store all their data on Google Cloud.

A lot of swiss government data is also stored in AWS, made a few headlines during covid because we "delegate our data to the americans"

We have your data, you have our money, sounds fair =)

Re: A bank runs serverless with PHP and AWS Lambda

#57
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't appear to have the clout then. I even think Laravel Vapor didn't use bref when they were setting up PHP runtime configurations etc

Re: A bank runs serverless with PHP and AWS Lambda

#58

I always love a story about a successful strangler pattern migration. 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'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.

I'd be more worried about decimal data types being interpreted as floats. That could get gnarly fast on the wrong language runtime, and is partially why Cobol programmers are still in demand in the financial sector.

Re: A bank runs serverless with PHP and AWS Lambda

#59
I'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)

I have immense respect for the author, but I'm perplexed about the decision to build a bank on this stack.

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 (https://twitter.com/themsaid/status/1716844479817154589).

I really do wonder what the bullet points of pros/cons in choosing to go serverless for something like this were.

Re: A bank runs serverless with PHP and AWS Lambda

#60

I feel like the naming of the bank (Treezor) is slightly unfortunate since it's so close to the "Trezor" bitcoin hardware wallet...

Tresor means safe / vault, it's a quite natural name for a bank.

The bank isn't named Tresor - it's named Treezor. That's quite a bit closer to Trezor than Tresor.

Anyways, if companies are going to use made up words for their names I'm happy to always deny them the benefit of the doubt.

Post reply on HN