Recent submissions

Comment · 7 years ago
I think you can force cold starts between your tests by re-deploying your function/container. You could (optionally) leave a small buffer (<1 minute) after the deployment to ensure that traffic has fully migrated.
Comment · 7 years ago
+1

You can also set up Cloud Scheduler to push to Pub/Sub, which can trigger your function. This is helpful if you don't want your function to be available via a public HTTPS endpoint.

Comment · 7 years ago
Cloud Functions PM here.

Your intuition around concurrency is correct: Cloud Functions has "per instance concurrency" of 1. Cloud Run lets you go significantly higher than that (default 80). This means that our infrastructure will generally create more instances to handle a request spike when using Cloud Functions vs. Cloud Run.

Creating an instance incurs a cold start. Part of that cold start is due to our infrastructure (generally this is small) but the other part is in your control. For example: if you create a client that takes X seconds to you initialize, your cold start will be at least X seconds. The initialization time will manifest as part of your cold start.

This has a few practical implications:

* writing code for Cloud Functions is generally more straightforward as single concurrency solves many problems regarding shared variables. You may also see some benefits in terms of monitoring/metrics/logging since you only need to think about one request at a time.

* you will likely see a higher incidence of cold starts on Cloud Functions during rapid scale-up, such as in response to a sudden traffic spike

* the impact of a given cold start will depend heavily on what you're doing in your container

* though I haven't validated this experimentally, I would expect that the magnitude of any given cold start (i.e., total latency contribution) would be roughly the same on Cloud Run as Cloud Functions IF you're running the same code

Comment · 7 years ago
Indeed. If you want to compile the binary yourself/don't want to upload source code, we have a serverless containers product currently available as an early preview (sign up at g.co/serverlesscontainers). This would allow you to compile your binary locally, write a simple Dockerfile and then build/deploy the resulting container.
Comment · 7 years ago
If you're interested in something along the lines of the latter, you can sign up for an early access preview here: g.co/serverlesscontainers
Comment · 7 years ago
It's definitely something that we've discussed.

Would you consider running a container that could be run like Cloud Functions? This container could run the binary that you create. It's not something that we support today but I'm curious whether this would meet your needs.

Comment · 7 years ago
> I'm curious how the implementation of Go has affected the ease of integrating other languages.

In some ways, it helps. You start to see similar issues arise and know what to look out for when you're launching a new runtime. In other ways, every language has its peculiarities and its own set of design considerations.

Launching/polishing a completely new language still takes a decent amount of work. Launching a new version of an existing language tends to be much quicker.

Comment · 7 years ago
While I can't share details publicly, I can confirm that we're actively working on new runtimes and performance improvements.
Comment · 7 years ago
Which ones would you like to see? We're always looking for new use cases to support.
Comment · 7 years ago
Comment · 7 years ago
You're not wrong. Cloud Functions Product Manager here. We've been running a private early access preview since we first showed this at GopherCon in August. I'm really happy to see this first step but we have a lot of work ahead of us.
Comment · 8 years ago
Comment · 8 years ago
Hi optimusclimb -- just want to make clear that using Cloud SQL to connect to PostgreSQL should work using Python 3.7 on the App Engine standard environment. Your earlier comment accurately pointed out a gap in our docs. We're going to address that -- thank you.

If you try Cloud SQL and find that it doesn't work with PostgreSQL on this new runtime, that's a bug and we need to fix it.

Comment · 8 years ago
Yes, Django and Django 2.0 (which only supports Python 3) should work.
Comment · 8 years ago
Sure, feel free to send it to me directly. stewartr at google.com.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton