【GCP】Professional Cloud Architect - Case Study 

## MountKirk Games

### Background
- a new game expect to be very polular.
- Plan to deploy backend to Compute Engine.
- Capture streaming metric
- Run intensive analytics
   - <font color="DarkRed">**Cloud Data Loss Prevention API**</font>
- integrate with a managed NoSQL database
   - <font color="DarkRed">**Migrate MySQL to BigTable or Datastore**</font>

### Business requirements
- Increase to a global footprint
  - <font color="DarkRed">**Use a global HTTP load balancer that serves managed instances groups that have autoscaling enabled**</font>
- Improve uptime-downtime
- Increase efficiency of the cloud resources
   - <font color="DarkRed">**Migrate MySQL to BigTable or Datastore**</font>
- Reduce latency to all customers


### Technical requirements
- Backend platform
  - Dynamically scale up or down based on game activity
     - <font color="DarkRed">**Managed Instance Group**</font>
     - <font color="DarkRed">**Use Kubernetes Engine if they want create microservices.**</font>
  - Connect to a transactional database service to manage user profiles and game state
     - <font color="DarkRed">**Cloud Spanner**</font>
  - Store game activity in a timeseries database service for future analysis
     - <font color="DarkRed">**BigTable for store datas**</font>
     - <font color="DarkRed">**BigQuery for analysis**</font>
  - No data lost due to processing backlogs
     - <font color="DarkRed">**Cloud Pub/Sub**</font>
  - Custom Linux distro
     - <font color="DarkRed">**Cannot use App Engine. (Standard or flexable)**</font>
     - <font color="DarkRed">**Compute Engine Only**</font>
     - <font color="DarkRed">**Use a global HTTP load balancer that serves managed instances groups that have autoscaling enabled**</font>
- Analytics platform
  - <font color="DarkRed">**Realtime Analytics**</font>
     - <font color="DarkRed">**Streaming Pipeline: Cloud Pub/Sub -> Cloud Dataflow -> BigQuery**</font>
     - <font color="DarkRed">**Batch Pipeline: Cloud Storage -> Cloud Dataflow -> BigQuery**</font>
  - Dynamically scale up or down based on game activity
     - <font color="DarkRed">**Use BigQuery for analytics**</font>
  - Process incoming data on the fly directly from the game servers
     - <font color="DarkRed">**Use Cloud Pub/Sub handles streaming data in real time**</font>
  - Process data that arrives late because of slow mobile networks
  - Allow queries to access at least 10 TB of historical data
     - <font color="DarkRed">**Big Query**</font>
  - Process files uploaded by user's mobile

## Advices
- <font color="DarkRed">**Using Stackdriver Logging and Monitoring**</font>
- <font color="DarkRed">**Use a lighter base image such as Alpine Linux improve deployment times**</font>

## TerramEarth

### Background
  - 20 million vehicles that collect 120 fields for data per second
  - data is stored locally
  - data is downloaded via a maintenanace port.
  - 200,000 vehicles are connected to a cellular network, allowing to collect data directly.

### Existing technical environment
- Linux and Windows-based systems that reside in a single U.S. west-coast-based data center. - - gzip CSV files from the field and upload via FTP
- Place the data in their data warehouse. 
- Aggregated reports are based on data that is three weeks old.

### Business requirements
- Decrease unplanned vehicle downtime to less than one week
  - <font color="DarkRed">**Use Streaming Pipeline**</font>
     - <font color="DarkRed">**Cellular -> Cloud Pub/Sub -> Cloud Storage -> Cloud Dataflow -> BigQuery**</font>  
  - <font color="DarkRed">**Use Batch Pipeline**</font>
     - <font color="DarkRed">**User -> Cloud Storage -> Cloud Dataflow -> BigQuery**</font>
- Support the dealer network with more data on how their customers use their equipment to better position new products and services
  - <font color="DarkRed">**Use Google Data Studio to create live charts that read directly from BigQuery. Give dealer representatives view rights to these charts to gain better understanding.**</font>
- Have the ability to partner with different companies-especially with seed and fertilizer suppliers in the fast-growing agricultural business-to create compelling joint offerings for their customers

### Technical requirements
- Decrease latency to the American Midwest and East Coast
  - <font color="DarkRed">**Upload data to regional bucket of location**</font>
- Create a backup strategy
- Increase security of data transfer from equipment to the data center
- Improve data in the data warehouse
    - <font color="DarkRed">**Use a BigQuery with table partitioning**</font>
- Use customer and equipment data to anticipate customer needs


### Applications
- a custom python application reads uploaded files, then writes to the data warehouse.
- a daily report to see what equipment needs repair.

### Advices
- <font color="DarkRed">**Use Cloud Pub/Sub handles streaming data in real time**</font>
- <font color="DarkRed">**Use Cloud Data Studio to replace current analytics software**</font>
- <font color="DarkRed">**Use Cloud Endpoints manage and project their APIs**</font>


## Dress4Win
### Background
- web app and mobile application
- committing to a full migration to a public cloud
  - <font color="DarkRed">**MySQL： Set up a MySQL replica/slave in Google Cloud using Cloud SQL and configure it for asynchronous replication from the MySQL master server on-premises until cutover.**</font>
  - <font color="DarkRed">**Rabbit MQ： Cloud Pub/Sub**</font>
  - <font color="DarkRed">**NAS： Cloud Storage bucket**</font>
  - <font color="DarkRed">**SAN： Persistent disk**</font>
  - <font color="DarkRed">**Apache Hadoop/Spark： Dataproc**</font>
- moving their development and test environments
- building a disaster recovery site

### Technical environment
- Databases:
  - MySQL. One server for user data, inventory, static data
     - <font color="DarkRed">**Cloud SQL migration service**</font>
     - MySQL 5.7
     - 8 core CPUs
     - 128 GB of RAM
     - 2x 5TB HDD (RAID 1)
- Compute
  - 40 web application servers providing micro-services based APIs and static content
     - <font color="DarkRed">**Managed Instance group**</font>
     - Tomcat - Java
     - Nginx
     - Four core CPUs
     - 32 GB of RAM
  - 20 Apache Hadoop/Spark servers:
     - <font color="DarkRed">**Migrate jobs to Dataproc**</font>
     - Data analysis
     - Real-time trending calculations
     - Eight core CPUs
     - 128 GB of RAM
     - 4x 5 TB HDD (RAID 1)
  - Three RabbitMQ servers for messaging, social notifications, and events:
     - <font color="DarkRed">**Migrate to Cloud Pub/Sub**</font>
     - Eight core CPUs
     - 32GB of RAM
  - Miscellaneous servers:
     - <font color="DarkRed">**Compute Engine**</font>
     - Jenkins, monitoring, bastion hosts, security scanners
     - Eight core CPUs
     - 32GB of RAM
- Storage appliances:
  - iSCSI for VM hosts
  - Fibre channel SAN - MySQL databases
  - 1 PB total storage; 400 TB available
  - NAS - image storage, logs, backups
  - 100 TB total storage; 35 TB available

### Business requirements
- Build a reliable and reproducible environment with scaled parity of production
- identity and access management (IAM) best practices for cloud to improve security
- Improve business agility and speed of innovation through rapid provisioning of new resources Analyze and optimize architecture for performance

### Technical requirements
- Easily create non-production environments
  - <font color="DarkRed">**Deployment Manager**</font>
- Implement an automation framework for provisioning resources
  - <font color="DarkRed">**Deployment Manager**</font>
- Implement a continuous deployment process for deploying applications
  - <font color="DarkRed">**pre-built Jenkins image form MarketPlace**</font>
- Support failover of the production environment to cloud during an emergency
- Encrypt data on the wire and at rest
- Support multiple private connections between the production data center and cloud environment.
  - <font color="DarkRed">**Dedicated Interconnect or Partner Interconnect**</font>