Live data from Hacker News

A bank runs serverless with PHP and AWS Lambda

bref.sh

111–120 of 132 posts

Re: A bank runs serverless with PHP and AWS Lambda

#111

Earlier quoted context omitted.

What is "SST" in this context? Is it this thing? https://sst.dev/ I'm having trouble understanding where PHP fits into this scenario. If your cloud backend is in PHP, can't you just host that anywhere, separate from your frontends? Where does the serverless come in? And which did you use? (There are so many out there now, from AWS Lambda to Cloudflare to Fastly, etc.) If you're not limited to AWS, Google's Cloud Run…

Sorry I wasn’t clear. Yes, that’s the correct SST. Yes, we could host our PHP anywhere and there are options like Cloud Run. We are on AWS and so I was talking about AWS Lambda but I understand that wasn’t clear at all. The reason for wanting to use Lambda is for bursty/inconsistent workloads. We have EC2 servers that handle all our traffic right now but some are oversized to handle the peaks. There are parts of our…

I see, thanks for explaining!

Have you also looked into Elastic Beanstalk? It's an older AWS service but it's made to help you handle bursts or scheduled peaks.

Re: A bank runs serverless with PHP and AWS Lambda

#112

> 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. Why? Why do people insist on doing this? Move something less important first, prove you can operate in production, then move the crown jewels.

[deleted]

Re: A bank runs serverless with PHP and AWS Lambda

#113
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…

[deleted]

Re: A bank runs serverless with PHP and AWS Lambda

#114

Earlier quoted context omitted.

Sorry I wasn’t clear. Yes, that’s the correct SST. Yes, we could host our PHP anywhere and there are options like Cloud Run. We are on AWS and so I was talking about AWS Lambda but I understand that wasn’t clear at all. The reason for wanting to use Lambda is for bursty/inconsistent workloads. We have EC2 servers that handle all our traffic right now but some are oversized to handle the peaks. There are parts of our…

I see, thanks for explaining! Have you also looked into Elastic Beanstalk? It's an older AWS service but it's made to help you handle bursts or scheduled peaks.

I was about to say that wouldn't work but EB does appear to let you use a custom AMI which means we could have a FreeBSD host and make use of our full existing stack. I had written it off thinking it was little more constrained, or at least constrained to AL2/linux hosts. Thank you for bringing that to my attention.

Re: A bank runs serverless with PHP and AWS Lambda

#115

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 do wonder how they came to Lambda though.

Probably some security certification that AWS Lambda comes with. I worked at Cambia Health that used Lambda (Javascript) for dealing with customer mobile data. It was a nightmare solution (cost and complexity) for what should have been a simple fan out queue and process system. They hired me to help fix it. Every other solution was a flat no. AWS Lambda was was HIPPA compliant (for whatever that's worth) and some other security assurances that I don't remember, so I was basically just another developer (with a moron for a manager).

Re: A bank runs serverless with PHP and AWS Lambda

#116

Earlier quoted context omitted.

This was my thought. Lambda works well for infrequent tasks. But hosting an API? That seems like it could get expensive pretty fast.

It's cheaper than most options where you need to pay a human to manage something with the same level of scalability and security that AWS provides.

ECS fargate is pretty easy to scale, and much more cost effective.

I personally don’t think running on EC2 is particularly difficult to manage, and it’s even cheaper again.

Re: A bank runs serverless with PHP and AWS Lambda

#117
post #3

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.

We use Lambda (via Laravel Vapor; https://vapor.laravel.com/ ) for a big analytics batch processing job every night; it spawns hundreds of thousands of individual jobs that make various API calls, but only for a few minutes. For the rest of the day it's doing very little. I'd imagine a bank has quite a few of these sorts of bursty bash processing needs; ACHes, end-of-day reconciliation, etc.

I did some fintech work as a junior / kinda non junior dev. This is correct. I think 90% of the work was taking pictures of checks, and setting up batch jobs. all batch: - money movement (between accounts) - transfers - wires - etc.

even the 'non' batch things were done in batch (even if it's do now, and only 1).

Re: A bank runs serverless with PHP and AWS Lambda

#118

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 do wonder how they came to Lambda though

Probably misplaced hype about being fully serverless.

As you said, ECS would be much more suitable while also addressing the issue that they had (spikes in traffic).

Lambdas behind API Gateway sounds like a good idea and even looks like one if you don't have experience with ECS and don't do a proper cost comparison analysis.

My team uses ECS' autoscaling to scale up to tens (or even hundreds) of thousands of tasks in minutes without issues.

Re: A bank runs serverless with PHP and AWS Lambda

#119
at Rosaly.com we've been using bref since 2021 and we're extremly happy with it, even if we've stopped to the php-fpm integration. We haven'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 )

1. we're a small team and we want to manage as less infra as possible 2. with their "dev mode" 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's Command.

Post reply on HN