
App Engine’s New Go 1.11 Runtime - SamWhited
https://blog.golang.org/appengine-go111
======
buss
I'm the tech lead and primary software engineer on the Go runtime. If you have
any questions, please don't hesitate to ask! I'm super thrilled to announce
that Go 1.11 is now available on App Engine! We now support...

* vendoring

* regular best-practice package structures

* go modules

* the regular Google Cloud client libraries: [https://github.com/GoogleCloudPlatform/google-cloud-go](https://github.com/GoogleCloudPlatform/google-cloud-go)

This is a "second-generation" runtime
([https://cloud.google.com/blog/products/gcp/introducing-
app-e...](https://cloud.google.com/blog/products/gcp/introducing-app-engine-
second-generation-runtimes-and-python-3-7)), meaning that we're now running
stock Go in the gVisor sandbox
([https://github.com/google/gvisor](https://github.com/google/gvisor)). We've
removed all of the restrictions present in the old runtime, like limited
socket and file access. You can even import "unsafe"!

If you're a current Go-on-App Engine customer, you should check out our
migration guide at [https://cloud.google.com/appengine/docs/standard/go111/go-
di...](https://cloud.google.com/appengine/docs/standard/go111/go-differences)
to learn how to migrate from the Go 1.9 runtime to the new Go 1.11 runtime.
For the time being, you can still use the legacy App Engine APIs with the Go
1.11 runtime, but you should start migrating to the Google Cloud client
libraries.

~~~
Sir_Cmpwn
Hey buss, thanks for stopping by.

How do you feel about the distinction between Google and Go? It sometimes
feels like they're joined at the hip, something which historically had made
people queasy (Java and Oracle, .NET and Microsoft, etc). Though Go is a
project which came from Google, I personally feel that it better serves the
interests of the Go community to treat them separately. Google receives
special treatment from Go - the announcement that AWS Lambda would support Go
did not receive similar fanfare on golang.org.

Side note: there is some activity on the Go blog which is more mutual
cooperation and less Google hivemind:

[https://blog.golang.org/go-cloud](https://blog.golang.org/go-cloud)

But I still wonder why this stuff belongs here.

~~~
justinclift
Agreed. To even submit content to the Go Blog requires a Google account. Ugh.

------
frakkingcylons
I'm not trying to stir shit up...buuut it seems odd that an announcement for a
Google Cloud product is being published on the Go project's blog?

I say this as a huge fan of Google Cloud and the experience of using Go on App
Engine.

~~~
justinclift
Likely because it's clearly Go related?

"Announcing [some cloud]’s New Go 1.11 Runtime"

That being said, I have no idea how similar submissions of Go content from
competing vendors would er... go. ;)

------
deckarep
Does this new classic+ environment now supersede the Flex environment?

I’m curious because now it’s seems like there are 3 solutions. Although I
really like the simplicity of this solution and the modernizing from the
constraints of true classic mode.

~~~
chrisbroadfoot
(GCP Gopher here)

If you can run within the standard environment, I'd suggest you do (but you
should check pricing, etc to see if it suits). Especially if you want 0-1
scaling.

I migrated golang.org from standard to flexible a couple weeks ago, primarily
because of increased control over the runtime (custom Docker image) and
increased instance sizes (configurable memory, CPU past the App Engine limits,
which caps out at 2 GB). See
[https://golang.org/issues/27205](https://golang.org/issues/27205) if you want
to read more.

~~~
iamgopal
Do you have blog post with data, number of instances etc previously and now ?

~~~
chrisbroadfoot
I don't, sorry. While the app was unhealthy, it was spinning up dozens of
instances. While it was healthy (on standard), I recall it ran on less than a
handful of instances.

It currently runs on two fat flexible instances (GCE VM), but could easily run
on one. We only run on two for some redundancy.

I've measured throughput of ~thousands of requests per second on a F4_1G on
apps I've worked on previously. They were CPU-constrained, but not doing very
much (JSON serialization).

The new runtime might be even better, since GOMAXPROCS is no longer 1.

correction to my post above: 1 GB is the max memory for standard:
[https://cloud.google.com/appengine/docs/standard/#instance_c...](https://cloud.google.com/appengine/docs/standard/#instance_classes)

------
knodi
I'm loving the new vendoring via go modules. Can't wait for it to be the
default in Go 1.12

------
yegle
Before anyone asks, this is still a beta release that's not covered by App
Engine SLA.

------
nixarn
Wonder if it's still possible to get answers here :) giving it a shot although
it's 13h old by now.

We use Go for a production server for multiple of our games, it's used to sync
gamestates between devices and allows us to remotely inspect and change
player's gamestate. Super handy and it's worked flawlessly! We used to use
python, but Go is much better suited as it's less error prone.

One question though, we've been having connectivity issues in China, the GAE
is deployed in the US, and as it seems there's no multiregional support. What
can we do? Ideally keeping as much of the convenience of the GAE as possible.

------
bpye
This actually seemed to be live a week or two ago, I managed to run Miniflux
[1] on App Engine with no changes though to get it working properly it would
need it's scheduling changing.

[1] -
[https://github.com/miniflux/miniflux](https://github.com/miniflux/miniflux)

~~~
steren
(App Engine PM here) Nice to hear! Yes indeed, we announced Go 1.11 on App
Engine last week at Cloud Next London.

~~~
bpye
Ah I hadn't seen that, I was quite surprised when I used goapp111 and it
deployed successfully. It's great to be able to take a normal Go application
and run it on Google Cloud. Thanks!

------
XorNot
Is this a GA product or still "beta"? Google's consistent announcement of
products as available while in beta is getting annoying, because their SLAs
for "beta" products are still 0 and thus impossible to be able to use in
actual business applications.

~~~
chrisbroadfoot
(GCP Gopher)

Yes, it's beta.

You're right - if you require an SLA, don't use beta products.

As per [https://cloud.google.com/terms/launch-
stages](https://cloud.google.com/terms/launch-stages):

> Beta is the point at which we are ready to open a release for any customer
> to use. There are no SLA or technical support obligations in a Beta release,
> and charges may be waived in some cases. Products will be complete from a
> feature perspective, but may have some open outstanding issues. Beta
> releases are suitable for limited production use cases.

------
dfischer
Hmm, I was just running into some context annoyances but this seems to remedy
some nuances regarding that. Cool! Good timing!

I’m assuming urlfetcher is deprecated now too? I’ll go read the migration
guide now ...

Awesome work! Love Go and GAE! Very happy so far.

~~~
buss
You can use net/http to fetch URLs now :)

Glad you're enjoying both Go and GAE!

~~~
dfischer
What was the reason urlfetcher had to be engineered in the past? Curious.

~~~
buss
I don't think I can say much more than: technical choices that required a
different path to fetch resources from the broader internet.

------
genericone
Am I understanding this correctly, App Engine has made it so "go run goapp.go"
on my local environment is basically accomplished with "runtime: goapp" in the
app.yaml? No other changes necessary in the code?

~~~
buss
runtime: go111, but otherwise -- yes!

------
xaduha
I haven't used GAE since early days, but I heard it supports Docker now. Why
wouldn't I just use Docker with whatever runtime I want?

~~~
chrisbroadfoot
(GCP Gopher)

We support custom images for the flexible runtime, but not for the standard
runtime.

If you're as keen for that as I am, sign up here:
[http://g.co/serverlesscontainers](http://g.co/serverlesscontainers)

------
thstart
I have some C++ libraries called from Go - can I use them now?

~~~
helpfulgoogler
cgo is supported.

------
ptype
F

