logoalt Hacker News

jack_sunsetless • today at 11:41 AM • 1 reply • view on HN

Finally Lambda without the adapter layer.. Now please add .NET and Java with those concurrent requests


Replies

CharlieDigital • today at 11:49 AM

Cloud Run says "Hi"

Edit: even better for .NET and Java as Cloud Run supports startup CPU boost[0] to improve initial cold start JIT performance.

What this looks like deploying a .NET web API to Cloud Run:

    # Auth first: gcloud auth configure-docker us-central1-docker.pkg.dev
    # Package and push using .NET tools (built in)
    dotnet publish --os linux --arch x64 /t:PublishContainer \
      -p ContainerRegistry=us-central1-docker.pkg.dev \
      -p ContainerRepository=ORG/REG/IMG \
      -c Release

    # Deploy web API to Cloud Run
    gcloud run deploy SVC \
      --image=us-central1-docker.pkg.dev/ORG/REG/IMG:latest \
      --project=PROJ \
      --region=us-central1 \
      --cpu-boost \
      --max-instances=2 \
      --min-instances=0

    # Get back a URL to the ingress
I run a bunch of workloads "for free" because most apps are going to fall into the monthly credit pool (180k vCPU seconds; 50h @ 1 vCPU) if it scales to 0.

[0] https://cloud.google.com/blog/products/serverless/announcing...

➕ show 1 reply