App Engine Flashcards

1
Q

What is App Engine?

A

Platform as a Service that provides a managed platform for running applications

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

What are the 4 components of App Engine?

A
  1. Application
  2. Service
  3. Version
  4. Instance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is an App Engine application?

A

A high level resource created in a project. Each project can have one App Engine Application.

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

What is an App Engine service

A

The service is the code executed in the app. It is typically structured to perform a single function. Services are defined by their source code and their configuration.

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

What is an App Engine version?

A

The source code and configuration of a service constitutes a version of the app. A service can have multiple versions.

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

What is an App Engine instance?

A

When a version executes, it creates an instance of the app.

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

What environments can you run in App Engine?

A
  1. Standard Environment

2. Flexible Environment

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

What are some key points of the Standard Environment?

A
  1. runs application in a pre-configured language specific sandbox
  2. fastest spin up time and less expensive
  3. suited for apps written in one of the supported languages and you don’t need OS packages or other compiled software external to the app
  4. Two types: 1st generation and 2nd generation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are key points about 1st generation Standard Environment implementations?

A
  1. Supports Python 2.7, PHP 5.5 or Go 1.9
  2. only a select set of white-listed extensions and libraries are allowed
  3. restricted network access
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are key points about 2nd generation Standard Environment implementations?

A
  1. java 8, Python 3.7, Php 7.2, Node.js 8 and Go 1.11
  2. any language extenstion
  3. full network access
  4. can scale down to 0 instances if there is no load
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are some key points about a Flexible Environment implementation?

A
  1. based on Docker Containers
  2. users can customize runtime environments by configuring container
  3. native support for Java 8, Eclipse Jetty 9, Python 2.7, Python 3.6, Node.js, Ruby, PHP, .Net and Go
  4. good option when you can package applications and services into a small set of containers
  5. works well when you have 3rd party software or libraries that need to run along side application
  6. slower spin up time and more expensive.
  7. will scale down but will always have at least one instance running
  8. the health is monitored by Google
  9. can work with OS background processes and write to local disk
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How can you delegate workload in App Engine?

A

Through push queues, pull queues or cron jobs

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

How do you deploy an App Engine with a .yaml file?

A
  1. gcloud app deploy [.yaml CONFIG FILE NAME]
  2. app.yaml is default, so no need to specify if that is the config file name
  3. must be run in directory containing .yaml file
  4. once deployed, output will provide url to view result of deployed service ([project name].appspot.com)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How do you stop an app engine instance via the shell?

A

gcloud app versions stop [v1 v2…]

pass in list of versions to stop

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

What type of instances can be running in App Engine?

A
  1. dynamic instances - based on load

2. resident instances - running all the time

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

What are some key points of dynamic instances of an App Engine app?

A
  1. it is optimized for cost savings by shutting down unused resources
  2. uses two types of scaling - automatic and basic
17
Q

What are the two types of scaling for dynamic instances of an App Engine app?

A
  1. Automatic Scaling

2. Basic Scaling

18
Q

What parameters are used in a yaml file to manage automatic scaling?

A

Add automatic_scaling to .yaml file along with parameters:

  1. target_cpu_utilization - max cpu usage before additional instances are started
  2. target_throughput_utilization - (0.5 to 0.95)
  3. max_concurrent_requests default 10, max 80
  4. max_instances
  5. min_instances
  6. max_pending_latency - max time a request waits in the queue to be processed.
  7. min_pending_latency
19
Q

What parameters are used in a yaml file to manage basic scaling?

A

add basic_scaling to .yaml file followed by parameters:

  1. ide_timeout
  2. max_instances
20
Q

What type of scaling do resident instances allow?

A

Manual scaling. can add manual_scaling to .yaml file along with the parameter instances

21
Q

What are the ways you can split traffic between App Engine versions?

A
  1. IP address - client is always routed to the same version as long as their IP doesn’t change
  2. HTTP Cookie - preferred way to split. will send user to same version even if their IP changes
  3. Random - default - distributes workload evenly
22
Q

How do you split traffic via shell?

A

gcloud app services set-traffic [SERVICE NAME] [SPLIT METHOD]

  • -splits v1=.4, v2=.6 for a 40/60 split
  • -migrate - indicates traffic should be migrated from previous version to new version
  • -split-by - ip, random or cookie