4 Answers
Hi Asad,
This is a really specific but great question! 🙂
You can actually run RUST on GAE Flex and there are a handful of boilerplate projects that allow you to do so, or you can work with custom runtimes to help achieve this. Whether this would be considered "optimal" would really come down to what type of performance is desired, sometimes because you can do something doesn’t always mean its optimal.
You are right, it does, in a sense, in its back end at least, run like a managed container orchestration service.
You can check out more about custom runtimes here: https://cloud.google.com/appengine/docs/flexible/custom-runtimes/
Really hope this helps a little, and I hope it brought a bit more clarity to things.
PJ
Thanks Peter. This looks like containers can run. I dont get the point in Google documentation to specify the runtimes in the flex environment. What I struggle with are sample questions that say "Client wants a serverless or managed environment that can scale up using non standard language e.g. C++ without handling the infrastructure". Choices have Cloud Run as well as App Engine Flex. What is right? I dont know. I saw this question in a youtube video and left a comment but never got a response.
The runtime versions being specified in the documentation is actually in the GAE – Standard list.
The main differences between GAE – Standard and GAE – Flex, is that that Standard contains predefined sandboxes that allow you to only run specific runtimes. You won’t be able to add libraries, write to the disk and so forth. Where as App Engine – Flex is based on GCE where you deploy Docker images and you can run what your environment needs, this includes OS runtime libraries and 3rd party libraries by specifying it in the Dockerfile.
Cloud Run is a managed platform that runs stateless containers from images in Container Registry that automatically scales from 0 to N based on HTTP traffic. You can deploy existing images, build images using Cloud Build and deploy them so you can use any language and any library.
to me the answer to the example question would be Cloud Run,
Thanks. Please Check the URL here https://cloud.google.com/appengine/docs/the-appengine-environments and look in the second column which specifies Flex Environment. I do understand the difference but I do not understand why Google specifies Run times in a service that runs Docker Images?
Hello! I think the key confusion might be due to how Google has written this documentation page. On the Flex side, it might be more clear if it said something like this, instead:
(Note: This is not a quote from the docs; this is Mattias's paraphrase.)
The flexible environment is optimal for applications that run in a Docker container. This includes but is not limited to using _any_ programming language _or version_--_regardless_ of whether that programming language or version is supported by the App Engine Standard environment.
...
It’s just trying to say that you can use any version of those App Engine Standard languages, not just the versions that App Engine Standard supports. And the next bullet says that you can use any language. 🙂
I hope this helps!
Mattias
The key main difference between App engine Flex and Cloud Run is the level of control, Google provides to the user.
In App Engine Flex, users can access the instance using SSH and deployed applications can write to local disk. The instance created for App Engine Flex is only for you and not shared, also you will know, where is your code is running.
Whereas Cloud Run is serverless: it abstracts away all infrastructure management, we will not know, on which instance or knode, our application is deployed.
Please ignore, if am wrong 😀
We use App Egine Standard at work for our project. When considering which environment to use it came down to whether we needed to install any binary/software on the server in support of our web application (ie. image/file processing packages). The Flex environment allows you to deploy from a Docker file and specify system level things that need to be installed. The Standard environment does not support this; however there are trade offs, the Standard environment exists because it has been optimised by Google to boot up instances really fast in comparison, and in turn your project can scale to 0 instances when not being used, saving you money. Flex on the other hand is designed, as I mentioned before, to allow additional packages and components to be installed on the instance prior, this takes longer for an instance to boot up and therefore you must always have at least 1 Flex instance running. So deciding between Flex or Standard comes down to cost and whether you need more accessibility to install additional software.
Thanks for your time and thoughts. Sure I understand what you specify but I do not understand why Google Specifies supported runtimes for Flex Environment? If it runs docker images why should it care if I run whatever ion it?