Hi Team,
Curious to know what would be the recommended solution architecture for unpredictable traffic from internet users. Referring cloud run vs gke based architectures for production use cases but need advise considering recent updates on cloud run. Is there any reference available for enhanced serverless architecture using below GCP components
API Gateway, Direct VPC and External load balancer.
https://cloud.google.com/architecture/application-development/ecommerce-serverless
Also, Is it possible to publish Load/stress/performance testing results to understand behavior considering HA and reliability. Need advice whether to consider this as robust compared to GKE option with heavy traffic and ecommerce requirements.
https://cloud.google.com/architecture/application-development/ecommerce-microservices
Solved! Go to Solution.
Hi @prashantevolver,
We do have ecommerce customers running various parts of their platforms on Cloud Run with significant and spiky user traffic. See an interview here, for example: https://www.gcppodcast.com/post/episode-236-ikea-retail-ingka-group-with-matt-lawson/
Heavy traffic is not a reason to not choose Cloud Run. On the other hand, you'd want to choose GKE if you find that there's some feature of your application that Cloud Run doesn't support - perhaps you need local storage, or a particular GPU model that Cloud Run doesn't offer yet, etc. Or perhaps you've standardized your whole business on Kubernetes and want to continue with that.
One thing to note is that every container that runs in Cloud Run will also run in GKE without any changes. So I'd recommend starting with Cloud Run because it's the easiest way to get started, and if down the line you find that you need the extra configurability of GKE, you can always switch over. We've seen many customers migrate in both directions.
Regarding benchmarking / load test data: it's very workload-specific, so we don't have any such published benchmarks. I'd recommend doing a search to see if there are any independent blogs that have published the kind of data you're looking for.
Hi @prashantevolver,
Welcome to Google Cloud Community!
For cases such as heavy or unpredictable traffic, both have their own value. Cloud Run is highly scalable and is designed to handle bursts of traffic easily which is ideal for unpredictable workloads. It works well with API Gateway and supports VPC connectivity for enhanced routing and security.
For load testing, Cloud Run offers robust solutions for many use cases. GKE, on the other hand, offers more control and customization for heavy traffic use cases. In the end, it will all depend on what your specific requirements and anticipated traffic patterns are.
I hope the information above is helpful.
Hi @prashantevolver,
We do have ecommerce customers running various parts of their platforms on Cloud Run with significant and spiky user traffic. See an interview here, for example: https://www.gcppodcast.com/post/episode-236-ikea-retail-ingka-group-with-matt-lawson/
Heavy traffic is not a reason to not choose Cloud Run. On the other hand, you'd want to choose GKE if you find that there's some feature of your application that Cloud Run doesn't support - perhaps you need local storage, or a particular GPU model that Cloud Run doesn't offer yet, etc. Or perhaps you've standardized your whole business on Kubernetes and want to continue with that.
One thing to note is that every container that runs in Cloud Run will also run in GKE without any changes. So I'd recommend starting with Cloud Run because it's the easiest way to get started, and if down the line you find that you need the extra configurability of GKE, you can always switch over. We've seen many customers migrate in both directions.
Regarding benchmarking / load test data: it's very workload-specific, so we don't have any such published benchmarks. I'd recommend doing a search to see if there are any independent blogs that have published the kind of data you're looking for.
But don't you think for heavy traffic Cloud Run is more expensive compared to GKE?
It depends quite a bit on the traffic pattern. For a spiky traffic pattern, customers often find that Cloud Run works out cheaper because they are not paying for idle resources due to Cloud Run's fast scaling.
If you have a large amount of predictable base traffic, Committed Use Discounts can help: https://cloud.google.com/run/cud
Finally, using a less managed solution like GKE often requires more management and operational overhead, which aren't free. Ultimately, the optimal choice depends on the specific workload as well as on your organization's capabilities and culture.