App Engine Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is the difference between App Engine standard and flexible environments?

A

Standard Environment

  • Your application runs in a lightweight instance inside a sandbox that restricts what your application can do
  • Can not write to disk or use non-whitelisted binaries
  • Limits CPU and memory options
  • Best for stateless apps that respond quickly
  • Scales from 0 to thousands of instances quickly
  • Runs in a Docker container on Compute Engine
  • Can use any language, write to disk and use any library
  • Can use any compute engine machine type
  • Allows for multiple processes
  • Requires at least one instance, takes longer to scale
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Where does the application run in with the Standard Environment

A

Application instances run in a sandbox, using the runtime environment of a supported language listed below.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which environments are flex and standard good for?

A

The standard environment is appropriate when you are looking to establish a sandbox environment supported by a standalone programming language–based application without a needed operating system or third-party software to run the application successfully. Flexible environments require supportable resources including Docker containers, code libraries, operating systems, and third-party applications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is an app?

A

An application is a top-level container that houses the services, versions, and instances of an application (see Figure 5-1). An application is associated with resources tied to a billable region and its data center. Resources include an app’s code, settings, credentials, and metadata.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the two types of GAE instances?

A

App Engine instances are either resident or dynamic. A resident instance is one that runs continuously, whereas a dynamic instance is available based on load requirements.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is an app Engine component architecture?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the 3 different types of scaling in App Engine?

A

Automatic scaling creates an instance under several conditions: request rate, response latencies, and specific application metrics. Thresholds can be specific to ensure each metric is achievable. There is a minimum number of instances that must be available for automatic scaling to be available at all times.

•Basic scaling creates instances only when requests are received. Each instance shuts down when the application idles. Basic scaling is for intermittent or user-based activities.

•Manual scaling supports operational continuity based on how many instances run regardless of load level. Tasks that require systems to run based on complex capacity needs will best utilize manual scaling as the choice.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Why choose App Engine over Compute/GKE?

A

You may choose Compute Engine or Kubernetes Engine over the App Engine flexible environment if there is a need for more control, scale, and orchestration. Compute Engine and App Engine flexible environment have many commonalities, even more so than App Engine standard environment. Most of the similarities have to do with maintenance and cost.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How can you configure GAE to scale?

A

The scaling type determines how the number of instances are provisioned relative to the incoming traffic to your application.

Manual Scaling
With manual scaling, the total number of instances are fixed – irrespective of the incoming traffic volume.

manual scaling graph

Manual scaling is best suited for applications that are small-scale and where the amount of traffic being received is predictable.

If we want to accommodate a higher traffic volume, we need to change the configuration and increase the number of instances ourselves.

Basic Scaling
Basic scaling provisions a new instance every time we receive a new incoming request and there are no existing instances available to handle it.

If an instance is idle for a certain amount of time, it is then de-provisioned.

This means that as your request volume increases, the number of instances will increase as well.

basic scaling increases instances with requests

We can configure basic scaling by specifying its parameters, namely:
Maximum instances - The upper limit on the number of instances that can be provisioned. This should be set to limit unforeseen costs in case of a large spike in traffic volume.
Idle timeout - The time after which the instance will shut down if it hasn’t received any requests.
Automatic Scaling
Automatic scaling gives us a smarter way to configure how our instances scale, compared to the basic scaling option.

Instead of provisioning a new instance for every pending requests, we can specify the performance requirements that we’re looking for, and App Engine will adjust the number of instances to meet them:

Latency - The amount of time that a request waits for before being served by an instance. We can provision and de-provision instances if the actual latency crosses a minimum or maximum threshold.
CPU utilization - We can specify the CPU usage threshold as a percentage, beyond which new instances will be provisioned to handle incoming requests.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Where can you configure scaling?

A

If your App Engine project directory contains an app.yaml file, GCP will use it to configure your App Engine application settings. Every option configured here has a default, so even if you don’t have app.yaml set, App Engine will choose a set of default options.

You can see the sample configuration on Github to see how the app.yaml file is located relative to the rest of our codebase.

To get your current configuration, we can go to the configuration view on the versions page as seen in the previous section:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly