Week 1 – Design and Process Introduction

Spread the love

Depending on the key learning objectives highlighted below, the course will teach you how to design and implement a corresponding Google Cloud infrastructure solution as reliable with scalability, availability, and performance. Below are the key learning objectives that will guide you through the course:

Learning Objectives:

  • The course structure and its content.
  • Users roles and personas.
  • Qualitative requirement with user stories Create quantitative requirements using key performance indicators (KPIs).
  • KPI Assessment Using Service Level Objectives (SLOs) and Service Level Indicators (SLIs).
  • Assess the quality of application requirements against SMART criteria.
  • Break monolithic applications into microservices.
  • Understand proper boundaries of microservices.
  • Architect stateful and stateless services to optimize scalability and reliability.
  • Implement services according to 12-factor best practices.
  • Build loosely coupled services by establishing an excellent REST architecture.
  • Design RESTful service APIs that are consistent and standard.
  • Automate service deployment using CI/CD pipelines.
  • Incorporate Cloud Source Repositories in source and version control.
  • Automated Build using Cloud Build and build triggers.
  • Container Registry – Store container images.
  • Create infrastructure using code: Terraform. Identify and choose the Google Cloud storage option that best suits the activities selected based on durability, availability, scalability, and cost constraints.
  • Store binary data within Cloud Storage.
  • Relational data with Cloud SQL and Spanner.
  • Firestore and Cloud Bigtable are for NoSQL data storage.
  • Data caching for fast access is done with Memorystore.
  • Create a data warehouse using BigQuery.
  • VPC networks design with cost, security, and performance in mind.
  • Configure global and regional load balancing for access to services.
  • Employing Cloud CDN to accelerate access for your applications.

DEFINING SERVICES

1. Which best describes an SLO?

  • It is a measurable, time bound key performance indicator for your application.
  • It is a short, measurable description of an application feature.
  • It is a target measure you want your service to achieve. (CORRECT)
  • It is a contract with end users that guarantees service quality

Correct: An SLO – Service Level Objective is a fixed aim in terms of a measurement or range of values to determine expected value performance and reliability from a service. This ensures that the service meets the desired criteria in instances such as availability, performance, or any other vital characteristics. Reliability could normally be simply one of those objectives, for example, defining an uptime percentage, response time, or error rate that is expected to be met by the service over time.

2. Using SMART criteria, which below would be the least effective KPI?

  • User sign ups per month
  • Page views per hour
  • Clicks per session
  • User experience design (CORRECT)

Correct: It is a Herculean task to try to measure, quantify, or put a timeframe to user experience, which is why it is generally not accepted as a KPI.

3. Which best describes a user story?

  • It is a short description of a typical person using the system.
  • It is a requirement of the system you are developing.
  • It is a narrative that describes the sequence of steps a typical user would perform to accomplish some task or goal when using the system.
  • It is a short description of a feature written from the user’s point of view. (CORRECT)

Correct: User experience design focuses on a feature from the perspective of the user making the feature hard to quantify or time bound and unsuitable as a key performance indicator (KPI).

MICROSERVICE DESIGN AND ARCHITECTURE

1. You’re building a RESTful microservice. Which would be a valid data format for returning data to the client?

  • JSON
  • XML
  • HTML
  • All of the above. (CORRECT)

Correct: Then they have a common Content-Type to be set in response header and are text based. However, JSON is the typical mode of usage. Both XML and JSON are valid formats.

2. You’re writing a service, and you need to handle a client sending you invalid data in the request. What should you return from the service?

  • A 400 error code (CORRECT)
  • A 200 error code
  • An XML exception
  • A 500 error code

Correct: The request could not be processed because the syntax was incorrectly formed by the client or the data was invalid, which is indicated by a status code of 400.

3. Which below would violate 12-factor app best practices?

  • Explicitly declare and isolate dependencies.
  • Keep development, testing, and production as similar as possible.
  • Treat logs as event streams and aggregate logs into a single source.
  • Store configuration information in your source repository for easy versioning. (CORRECT)

Correct: The code must be separated from the configuration, as the latter varies between deployments and the former does not. A good test of this separation would be whether it is possible to publish the whole repository as an open-source one without compromising any sensitive credentials.

4. You’ve re-architected a monolithic web application so state is not stored in memory on the web servers, but in a database instead. This has caused slow performance when retrieving user sessions though. What might be the best way to fix this?

  • Move session state back onto the web servers and use sticky sessions in the load balancer.
  • Increase the number of CPUs in the database server.
  • Make sure all web servers are in the same zone as the database.
  • Use a caching service like Redis or Memorystore. (CORRECT)

Correct: Services delivered should be stateless, with tools like Redis or Memorystore to provide very fast caching services to manage state externally. So it allows statelessness that further caters to scalability and high availability.

DEVOPS AUTOMATION

1. What Google Cloud feature would be easiest to use to automate a build in response to code being checked into your source code repository? 

  • Cloud Scheduler 
  • App Engine 
  • Cloud Functions 
  • Build triggers (CORRECT)

Correct: It is correct. The purpose of Cloud Build triggers is to execute an automated build in response to source code changes.

2. Which Google Cloud tools can be used to build a continuous integration pipeline? 

  • Cloud Source Repositories 
  • Cloud Build 
  • Container Registry 
  • All of these (CORRECT)

Correct: There are all correct options. Source Repositories offer a private Git repository; Cloud Build is for building containers; and Container Registry serves as a Docker image repository performing vulnerability analysis. These are commonly used in time to set up a continuous integration pipeline, where building and testing code on a commit creates and publishes an image to the registry.

CHOOSING STORAGE SOLUTIONS

1. Currently, you are using Firestore to store information about products, reviews, and user sessions. You’d like to speed up data access in a simple, cost-effective way. What would you recommend?

  • Move the data to Spanner.
  • Cache the data using Memorystore. (CORRECT)
  • Move the data to Cloud Bigtable.
  • Move the data to BigQuery.

Correct: Memorystore becomes the best option when taking into account data model, performance, scale, cost, and availability. It provides in-memory caching that improves application performance, accommodates high-availability operations, provides scale, and is also within the cost range of many scenarios.

2. You want to analyze sales trends. To help achieve this, you want to combine data from your on-premises Oracle database with Google Analytics data and your web server logs. Where might you store the data so it is both easy to query and cost-effective?

  • BigQuery (CORRECT)
  • Spanner
  • Firestore
  • Cloud SQL

Correct: BigQuery has been engineered towards data analytics only. The most obvious integration of this architecture would be in any application that requires data analytics. The scaffolding for ingesting data from arbitrary sources is entirely in place, and along with its model of pay-for-storage, pay-only-for-queries-run cost, it is perfect for wide analytic workload being served.

3. You are a global financial services company with users all over the world. You need a database service that can provide low latency worldwide with strong consistency. Which service might you choose?

  • Firestore
  • Cloud SQL
  • BigQuery
  • Spanner (CORRECT)

Correct: A major feature of Spanner allows the scaling of relational data with strong consistency while also being globally distributed and ensuring low latency. Traditionally, high availability and automatic replication allow it to serve a purpose within financial services. The availability and reliability are critical for that particular field.

4. You need to store user preferences, product information, and reviews for a website you are building. There won’t be a huge amount of data. What would be a simple, cost-effective, managed solution?

  • Spanner
  • Cloud SQL
  • BigQuery
  • Firestore (CORRECT)

Correct: Automatic scaling, ACID transactions, and live synchronization facilitate Firestore application development but also make it a more powerful solution for real-time applications. Firestore also has fully enabled integration of Google Cloud and Firebase for seamless cloud alignment. Furthermore, Firestore offers a free tier that allows developers to start without paying any upfront costs.

GOOGLE CLOUD AND HYBRID NETWORK ARCHITECTURE

1. You want a secure, private connection between your network and a Google Cloud network. There is not a lot of volume, but the connection needs to be extremely reliable. Which configuration below would you choose?

  • VPN
  • VPN with high availability and Cloud Router. (CORRECT)
  • Cloud Interconnect
  • VPC peering

Correct: This is more secure and reliable and definitely less costly than Cloud Interconnect. Quite simply, the solution taken here is better for connecting to Google Cloud, yet still lower overhead with strong performance and security.

2. You have a contract with a service provider to manage your Google VPC networks. You want to connect a network they own to your VPC. Both networks are in Google Cloud. Which Connection option should you choose?

  • VPN with high availability and Cloud Router.
  • VPC peering (CORRECT)
  • VPN
  • Cloud Interconnect

Correct: VPC peering connects two VPCs with their information within the same project or outside it in their respective organizations. Therefore, there exist no additional locations for communicating the networks. The use of connecting resources shown is flexible and scalable for many kinds of connections between different environments.

3. You are a large bank deploying an online banking service to Google Cloud. The service needs high volume access to mainframe data on-premises. Which connectivity option would likely be best?

  • VPN
  • HTTPS
  • Peering
  • Cloud Interconnect (CORRECT)

Correct: This Cloud Interconnect is an ideal option for workloads that require quick and reliable connections since it offers high bandwidth and low latency. It should be noted that the cloud interconnect does not encrypt by default, so it requires encryption at the application level.

4. You are deploying a large-scale web application with users all over the world and a lot of static content. Which load balancer configuration would likely be the best?

  • TCP load balancer with SSL configured.
  • HTTP load balancer with SSL configured and the CDN enabled.
  • UDP load balancer with SSL configured and the CDN enabled. (CORRECT)
  • HTTP load balancer with SSL configured.

Correct: Because traffic goes through HTTP(S), the load balancer should also be externally integrated as well as global while providing efficient request handling. Adding a CDN would improve performance further by caching content closer to users and reducing almost all costs related to data transfer and latency.

Leave a Comment