# GCP  * CE: Compute Engine,管理伺服器 * IAM: 管理權限 * PD: Persistent Disk,用於儲存 * VPC: Virtual Private Network,管理網路 * CS: Cloud Storage ⠀ * Scaling: 根據設定調整設定 * Load Balancing: 負載平衡 * Failover: 可以把死掉的伺服器換掉 * Backup: 備份 ## VPC  相較於AWS,GCP Subnet可以與不同Zone傳送訊息\ \ \ ⠀  * Subnet: 內部的VM可互相傳送資料 * Virtual Network: 可跨Subnet傳送資料 * NAT Gateway: 讓只有內網IP的VM可以發送請求到Internet * Default Ineternet Gateway: 把VPC內的請求轉發至Internet\ \ \ \  * VPC: 不須驗證 * Subnet: 不須驗證 * VM: 進出須驗證,屬於Stateful,同一個請求不須二次驗證\ \ \ ⠀ ## GCP Storage ### Local SSD & PD  * Incremental: 漸進式備份\ \  \ \ ⠀ ### PD & Cloud Storage comparison \ \ \ ⠀ ### Google Cloud Storage  * Bucket Naming: 不可重複 * Bucket Instance: 相較於AWS,GCP可在不同Region複製 * 啟用Versioning後覆蓋檔案或刪除檔案不會完全消失,只是加上noncurrent標籤而已 ### GCP不同儲存類型 | | Standard Storage | Nearline Storage | Coldline Storage | Archive storage | |:------------ |:----------------:|:----------------:|:----------------:|:---------------:| | Availability | ooooo | oooo | oooo | oooo | | Retrive time | o | o | o | ooo | | Price | oooo | ooo | oo | o | | Retrive cost | o | oo | ooo | oooo | * Archive Availability 影片說是no guarantee,但Google自己是說99.0%,跟Nearline/Coldline一樣 * 可透過Object Lifecycle management設定條件將不常用檔案移至便宜的儲存方案 \ \ ⠀ ## GCP Machine Image  * **僅儲存Machine Type, Volume Mapping和Persistent Disk** #### Compare to PD snapshot & Custom image & Instance templates \ \ ## Cloud SQL  相比起EC2+DB+EBS方案,RDS可以省去許多手動步驟(黑色為需要手動操作的部分)\ \  * P: Primary instance,主要的instance,負責讀寫 * S: Standby instance,當Primary instance死掉時Private IP會把目標變成Standby instance,讓使用者繼續使用服務,並且會進行完全同步備份 * R: Read replica: 只負責讀的請求,可以分擔Primary instance流量,與Primary instance進行非同步備份,會有延遲。另外Read replica也可以跨Region、Zone * Transaction log: 可以用於恢復資料,精度為秒 * EBS snapshot: 備份,精度為天\ \ ## Spanner  * Leader Replica(紅色框框): 負責Commit寫入請求與讀取 * R/W Replica: 負責Vote write請求與讀取 * Witness replica: 只投票 * Read-only Region: 只讀取 #### Spanner可以降低讀取延遲,但會增加寫入延遲  https://aws.amazon.com/about-aws/whats-new/2022/11/amazon-rds-sql-server-cross-region-read-replica/ ## IAM  * 一個Role有多個Permission * Member可以是Google Account、Service Account(GCP資源)、Google Group(多個Google Account) # AWS  * EC2: Elastic Compute Cloud,管理伺服器 * IAM: 管理權限 * EBS: Elastic Block Store,用於儲存 * VPC: Virtual Private Network,管理網路 * S3: 用於儲存 ⠀ * Scaling: 根據設定調整設定 * Load Balancing: 負載平衡 * Failover: 可以把死掉的伺服器換掉 * Backup: 備份\ \ ⠀ ## VPC  相較於GCP,AWS Subnet無法與不同Availablity Zone傳送資料\ \ \ \  * Subnet: 子網,Private Subnet無法直接與Internet溝通 * Route Table: 指引網路流向,如使某Private Subnet連至另一個Private Subnet * Internet Gateway: 可讓VPC內的請求發至Internet * NAT Gateway: 能將NAT Gateway放到Public Subnet,讓沒有Public IP的Subnet也能發送請求到Internet * NACL(~~鹽巴~~): Private Subnet的保護層,屬於Stateless,流量進出都需驗證 * SG(~~味精~~): 虛擬主機的保護層,屬於Stateful,流量只需一次認證 * ###### ENI: SG裡面並不是直接包EC2,而是ENI,當EC2故障或移除時可將這個ENI再套用到其他的EC2 ## AWS Storage \ \ \ \ \ \ \ \ \ \ \ \  * 相較於GCP,AWS Consistency較低\ \ \ \  * Bucket Naming不可重複 * 啟用Versioning後刪除或覆蓋檔案後不會完全消失,只是加上標籤\ \ \ ⠀⠀ #### Amazon不同儲存類型 | | S3 Standard | S3 Standard-IA | S3 One Zone-IA | S3 Glacier | S3 Glacier Deep Archive | |:------------:|:-----------:|:--------------:|:--------------:|:----------:|:-----------------------:| | Availability | ooooo | oooo | o | ooooo | ooooo | | Retrive time | o | o | o | ooo | ooooo | | Price | ooooo | oooo | ooo | oo | o | | Retrive cost | o | oo | ooo | oooo | ooooo | * S3 Intelligent-Tiering: 可以根據條件將檔案移至其他等級的儲存空間來節省成本或加快存取時間\ \ \ ⠀ ## RDS  相比起EC2+DB+EBS方案,RDS可以省去許多手動步驟(黑色為需要手動操作的部分)\ \  * P: Primary instance,主要的instance,負責讀寫 * S: Standby instance,當Primary instance死掉時DNS會把目標變成Standby instance,讓使用者繼續使用服務,並且會進行完全同步備份 * R: Read replica: 只負責讀的請求,可以分擔Primary instance流量,與Primary instance進行非同步備份,會有延遲。另外Read replica也可以跨Region、AZ * Transaction log: 可以用於恢復資料,精度為分鐘 * EBS snapshot: 備份,精度為天 ## IAM  * 一個User or Group可以套用多個Policy * Role: 主要給AWS Service使用 * Principal: 我能給誰用 ⠀ * Identity-based policy: 我能用誰 * Resource-based policy: 誰能用我 ###### removed <!-- ## VPC ### AWS GCP VPC comparison  | AWS | GCP | | -----------------------:|:--------:| | 不可跨Availability Zone | 可跨zone | ## S3 & Google Cloud Storage #### AWS GCP Storage Comparison | | AWS | GCP | |:------------ |:-----:|:-----:| | Availability | ooooo | ooooo | | Consistency | ooo | ooooo | | cross region | :x: | ☑️ | -->
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up