We are migrating our legacy backend to a serverless model and are torn between AWS Lambda and Google Cloud Run. Our team is very comfortable with Docker containers, which makes Cloud Run attractive, but our existing infrastructure is heavily invested in the Amazon ecosystem. In terms of <Cloud (AWS/Azure/GCP) Computing> trends, which provider offers better long-term scalability and cold-start performance for containerized apps?
3 answers
Since your team is already skilled with Docker, Google Cloud Run is a very strong contender. Unlike Lambda, which has specific runtimes and execution limits, Cloud Run lets you run any containerized application with more flexibility in terms of memory and CPU. However, if your data is already in AWS S3 or DynamoDB, the latency and integration benefits of staying within AWS might outweigh the container flexibility of GCP. Lambda has also improved significantly with 'Provisioned Concurrency' to mitigate cold start issues, making it very reliable for production-grade microservices.
Michelle, that's a fair assessment, but doesn't Cloud Run handle concurrency better by allowing multiple requests to be processed by a single container instance?
Don't forget that AWS now supports container images for Lambda too, so you don't necessarily have to abandon the Docker workflow to stay on AWS.
Very true, Steven! Although the container support in Lambda still has that 10GB image size limit, it definitely bridges the gap for teams wanting to maintain their CI/CD pipelines.
You hit the nail on the head, Brian. Cloud Run allows a single instance to handle up to 250 concurrent requests, whereas Lambda is strictly one request per execution. This can lead to much better resource utilization and lower costs for high-traffic applications that don't need the heavy isolation of Lambda's model.