Infra, Apps & APIs Flashcards
Infra, Networking, Security, Apps & APIs (134 cards)
What are the four overarching managed service options on GCP?
IaaS - Compute Engine
PaaS - App Engine
CaaS - Cloud Run
FaaS - Cloud Functions
What are the five fundamental attributes of Cloud Services?
1) On-demand Self-Service - No human intervention needed to access resources
2) Resource Pooling - Provider shares resources to customers
3) Rapid Elasticity
4) Measured Service - Pay for what we consume
5) Internet-Enabled - Access from Anywhere
What are the two primary design principles of cloud native architecting?
1) Scalability:
- Ability to handle varying demands
- Reduce cost of under-utilised resources
- Scale up and down without compromising performance
2) Resilience:
- Functions despite failures of individual components
What are the three migration methodologies for Google Cloud, and what are their pros and cons?
1) Lift and Shift
Pro: No need to rebuild applications or learn cloud skills.
Cons: Ignores cloud-native benefits, applications run without scaling and resilience benefits of cloud-native technologies.
2) Improve and Move
Pro: Introduces automation of scaling and reslience.
Cons: New skills and code management.
3) Rip and Replace
Pro: Remove technical debt
Cons: Requires highest level of time and skill investment.
What are the 4 key design implementation choices to achieve a microservice architecture?
1) Loosely coupled services.
2) Asynchronous operations.
3) Stateless components.
4) Caching.
What is the strangler pattern?
A methodology of incrementally replacing components of legacy applications with new services.
Named after the strangler tree.
What are the four types of technical testing?
1) Unit Testing - Tests individual components of the application.
2) Integration Testing - Tests components grouped together.
3) Performance Testing - Tests the responsiveness of individual components.
4) Load / Endurance Testing - Tests the entire system placed under heavy load.
What is Unit Testing and what are its pros and cons?
Tests individual components of the application.
Pro: Easy to spot errors and automate.
Con: Does not test external dependencies.
What is Integration Testing and what are its pros and cons?
Tests components of an application when they are grouped together and reliant on one another.
Pro: Tests external dependencies and can be automated through mocking.
Cons: Can be difficult to understand the root of errors due to the black-box nature of integration.
What is the recommended production-grade method for running Cloud Build?
Declaratively, by creating a cloudbuild.yaml in your SCR.
What are the 3 types of roles you give to a GCP account within a project and what do they provide?
Primitive Roles - Applys at Project Level: Owner, Editor, Viewer and Billing Administrator.
Predefined Roles - Applys at GCP service level: Such as write access to Cloud Storage, but only view access to Compute Engine.
Custom Roles - Create your own roles such as “instanceOperator” where you can specify and manage the permissions. They can only be specified at the project level, not folder or org.
Explain what blue / green deployment strategy is.
Blue-green deployment is a deployment strategy that utilizes two identical environments, a “blue” (aka staging) and a “green” (aka production) environment with different versions of an application or service. Quality assurance and user acceptance testing are typically done within the blue environment that hosts new versions or changes. User traffic is shifted from the green environment to the blue environment once new changes have been tested and accepted within the blue environment.
What are the pros and cons of a blue / green deployment strategy?
Benefit - Rollback is straight forward, traffic can simply be routed back to the Green environment if the Blue environment sees any issues.
Drawbacks -
1) Cost of running two production-grade environments.
2) Depending on the implementation, shifting all user traffic at once can present risks.
3) In-flight user transactions may be lost when the shift in traffic is made.
Explain what canary deployment is.
A canary deployment is a deployment strategy that releases an application or service incrementally to a subset of users. All infrastructure in a target environment is updated in small phases (e.g: 2%, 25%, 75%, 100%). A canary release is the lowest risk-prone, compared to all other deployment strategies, because of this control.
What is the primary benefit and drawback of canary deployment strategies?
Pro: It’s cheaper than a blue-green deployment because it does not require two production environments.
Con:
- Some tests will need to be conducted in production.
- Often need to establish a trusted tester user base to roll out new features to.
Which fully managed platform uses a container as its sole deployment artifact?
Cloud Run
What are some good uses cases for a message bus like Cloud Pub/Sub?
Distributing messages between downstream microservices.
You wish to direct a small percentage of production traffic to a new version of your application, so that your changes can be tested with live users. What is the name of this deployment pattern?
Canary Deployment
How should application source code be stored for cloud-native software development?
The full codebase, including configuration and deployment files, should be stored in a collaborative source code repository, such as git.
What type of testing tests external dependencies and multiple components and is sometimes referred to as a type of “black box” testing?
Integration testing
You wish to maintain two entirely separate production environments, so that you can work on each one in isolation and then switch all production traffic between them when you are ready to release updates. What is the name of this deployment pattern?
Blue/Green Deployments
What is the MOST efficient way to grant access to an object in cloud storage to an external user with no Google account?
Create a signed URL to grant temporary access to the object.
Signed URLs are a convenient way to embed the necessary authentication information into the URL itself, and to grant time-restricted access to specific objects in file storage.
How can you prevent accidental deletion of objects in cloud storage for a minimum period of time?
Apply a retention policy to the bucket to prevent the deletion of objects until they have reached a minimum age.
Your application expects a MySQL database connection to exist on localhost (i.e., running on the same server), but you would rather use Cloud SQL. How can you facilitate this?
Use the Cloud SQL proxy.