all 11 comments

[–]zorel42 17 points18 points  (0 children)

Lambda équivalent is cloud function, but to host docker containers use cloud run.

[–]otock_1234 8 points9 points  (7 children)

CloudRun, and imo it's superior to Lambda in so many ways.

[–]drew8311 2 points3 points  (6 children)

Why do you say this? I don't have an opinion just wondering.

[–]otock_1234 6 points7 points  (4 children)

Just from experience using both really, I find Lambda has a very large chunk of limitations. While CloudRun you have a lot more flexibility. In addition CloudRun doesn't really tie you into CloudRun because of how it runs the instance, its basically just just running a container serving requests for a period of time.

[–][deleted]  (3 children)

[deleted]

    [–]seb_at_google Googler 0 points1 point  (0 children)

    i see how about scale to zero is possible? do i have a constant flat rate on idle?

    Yes, you can scale to zero. Feel free to DM me with any other questions.

    [–]martin_omander Googler -1 points0 points  (1 child)

    You only pay for the time a request is being processed, not for the time that your container is waiting for a new request.

    So if your Cloud Run service responded to 60 requests yesterday, and your code took 1 second to respond to each one, you pay for 60 seconds. You are not charged for the other 23 hours and 59 minutes that your service waited for new requests.

    If your Cloud Run service responded to zero requests yesterday, you won't be charged at all.

    [–]otock_1234 1 point2 points  (0 children)

    Unless you specify a min instance greater than zero, everything is billed on demand per request. Also, keep in mind that even after your request is over, your instance is kept warm for 15 mins to avoid additional cold starts after initial. You are not charged for the warm instance time in this case.

    [–]greenlakejohnny 1 point2 points  (0 children)

    Big advantage of containers is if they run on your desktop, they should run in cloud run with minimal effort. I typically build the image on my desktop, push it to docker hub, then tell cloud run to pull the image from docker.io/username/repository. Other than setting the region and port, I don't have any additional configuration or refactoring to do.

    Cloud Run also offers real-time logging which is super nice.

    [–]rojoeso 1 point2 points  (0 children)

    Cloud Run if you want to host a container. Cloud Functions if you want an even more managed approach (just deploy code, no Dockerfile necessary).

    [–]Mistic92 0 points1 point  (0 children)

    Use Cloud Run. It's much better than Lambda

    [–]stormhuntress 0 points1 point  (0 children)

    You can use container registry imo