Google Cloud

Google Cloud เปิดตัวบริการใหม่ที่สำคัญในงาน I/O 2022 ปีนี้คือ ฐานข้อมูล AlloyDB ที่เข้ากันได้กับ PostgreSQL 100% (อิงอยู่บน PostgreSQL 14 เวอร์ชันล่าสุด) แต่สถาปัตยกรรมข้างหลังออกแบบใหม่หมด มีความเร็วอ่านเขียนทั่วไปเพิ่มขึ้นจาก PostgreSQL 4 เท่า และถ้าเป็นการคิวรีข้อมูลมาวิเคราะห์จะเร็วขึ้นสูงสุด 100 เท่า

เราสามารถเรียก AlloyDB ว่าเป็นคู่แข่งของ Amazon Aurora ที่ AWS นำ MySQL/PostgreSQL มาปรับแต่งเพิ่มเติม (แต่ฝั่งกูเกิลมีเฉพาะ PostgreSQL) ซึ่งกูเกิลก็ชูว่า AlloyDB เร็วกว่า Aurora PostgreSQL 2 เท่าด้วยเช่นกัน

ฟีเจอร์อื่นของ AlloyDB คือฟีเจอร์ด้านวิเคราะห์ข้อมูล และใช้ machine learning ช่วยจัดการฐานข้อมูล ทั้งการแบ็คอัพ แพตช์ สเกล และ replication ให้อัตโนมัติ กูเกิลการันตี SLA ที่ 99.99% ซึ่งน้อยกว่าฐานข้อมูล Cloud Spanner หนี่งหลัก (99.999%) แต่ก็มีโจทย์การใช้งานและราคาที่ต่างกัน


สถาปัตยกรรมเบื้องหลัง AlloyDB คือการแยกส่วน compute และ storage ออกจากกัน ในฐานข้อมูล relational database แบบดั้งเดิม เซิร์ฟเวอร์เครื่องเดียวมีทั้งส่วน compute/storage รวมกัน ทำงานจบในตัว และขยายด้วยวิธี scale up เพิ่มเครื่องให้ใหญ่ขึ้น ซีพียูแรงขึ้น สตอเรจมากขึ้น ซึ่งไม่ค่อยยืดหยุ่นนัก

ฐานข้อมูลยุคถัดมาที่เริ่มมีคลาวด์ เปลี่ยนมาใช้วิธี scale out เพิ่มจำนวนเครื่องแทน ข้อดีคือแก้ปัญหาเรื่องปริมาณพื้นที่สตอเรจให้ยืดหยุ่นกว่าเดิม แต่ยังเจอข้อจำกัดเรื่องการวางแผนพื้นที่สตอเรจให้เหมาะสม ต้องบาลานซ์ระหว่างพื้นที่เยอะเกินความต้องการ กับพื้นที่หรือ I/O ไม่เพียงพอในจังหวะโหลดหนักๆ (spike หรือ hotspot)

AlloyDB แก้ปัญหาข้างต้นด้วยการแยกส่วน compute และ storage จากกันอย่างสิ้นเชิง ทั้งสองส่วนสามารถสเกลแบบคลัสเตอร์ได้ และใช้แคชมาคั่นกลางในหลายจุดเพื่อรองรับโหลดแต่ละประเภท

จุดเด่นอย่างหนึ่งของ AlloyDB คือแก้ปัญหาเรื่อง read-only replica หรือการทำซ้ำฐานข้อมูลให้อ่านได้อย่างเดียว (แก้ปัญหาฐานข้อมูลเดียวรองรับโหลดการอ่านไม่ไหว ซึ่งมีข้อจำกัดเรื่องการซิงก์ข้อมูลระหว่าง replica ตามมา) ด้วยการสร้าง multiple read-only replica instances ขึ้นมาหลายๆ ชุด โดยไม่ต้องทำสำเนาฐานข้อมูลจริงๆ

เหตุผลเป็นเพราะ AlloyDB แยกตัวข้อมูลที่เก็บจริง (storage layer) กระจายอยู่หลายๆ โซนของคลาวด์อยู่แล้ว ดังนั้นก็แค่สร้าง replica instance ขึ้นมาหลายๆ ตัว ซึ่งอาจเรียกข้อมูลจริงที่อยู่คนละแห่งกันได้เลย

สถาปัตยกรรมส่วน storage layer ของ AlloyDB (กรอบสีฟ้าในภาพ) แยกได้เป็น 3 ส่วนย่อยคือ

  1. log storage สำหรับเขียน write-ahead log (WAL) แบบรวดเร็วมาก
  2. log processing service (LPS) เพื่อประมวลผล WAL และสร้างบล็อคสำหรับเก็บข้อมูล
  3. block storage พื้นที่เก็บข้อมูลจริงๆ โดยมีฟีเจอร์ sharding, แยกเก็บตาม region ของคลาวด์ เพื่อป้องกันปัญหาสตอเรจพังทั้งโซน

จากภาพ เริ่มจาก primary database instance เขียนการเปลี่ยนแปลงของฐานข้อมูล (INSERT/DELETE/UPDATE) เป็น WAL log ส่งเข้ามาที่ log processing service (LPS) ให้ดำเนินการเปลี่ยนแปลงข้อมูลจริงๆ ที่เก็บใน block storage อีกที

จากนั้น บล็อคข้อมูลสามารถถูกส่งให้ replica instance อื่นๆ ได้โดยตรง เมื่อนำมาประกอบเข้ากับ WAL log ที่ส่งมาจาก primary instance เราก็จะได้ replica instance ที่สามารถทำงานได้เหมือนกันทันที โดยไม่ต้องสร้างสำเนาข้อมูลขึ้นมาทั้งก้อน

กูเกิลอธิบายว่า สถาปัตยกรรมนี้แยกส่วน compute/storage จากกันอย่างสิ้นเชิง ในการประมวลผล log (LPS) สามารถ scale-out ต่างหากได้โดยไม่ต้องยุ่งกับการสำเนาข้อมูล ฝั่งการเก็บข้อมูลบล็อค ก็สามารถกระจายความเสี่ยงข้อมูลพังทั้งโซน (zonal failure) โดยสำเนาบล็อคทั้งหมดข้ามโซนของคลาวด์ได้

การแยก compute/storage ด้วยกันยังช่วยแก้ปัญหาคอขวด IO และไม่จำเป็นต้องทำจุด checkpoint ของฐานข้อมูลทั้งก้อน เลเยอร์ของ compute ทำหน้าที่แค่คิวรีงานตามสั่งอย่างเดียว ส่วนเลเยอร์ storage ก็เก็บข้อมูลอย่างเดียว การสั่งแบ็คอัพ ทำที่เลเยอร์ storage ไม่กระทบทรัพยากรที่ใช้ในเลเยอร์ของ compute

รายละเอียดทางเทคนิคเพิ่มเติมอ่านได้จาก Google Cloud

กูเกิลเน้นกลุ่มลูกค้าที่ต้องการย้ายจากฐานข้อมูลแบบเดิมๆ (เช่น Oracle) มายัง AlloyDB ที่เป็นฐานข้อมูลโอเพนซอร์ส แต่มีประสิทธิภาพสูงกว่า และออกบริการช่วยย้ายข้อมูล Oracle to PostgreSQL มาให้พร้อมกัน

ส่วนวิธีคิดเงินของ AlloyDB แยกคิด 3 ส่วน (ตัวอย่างราคาเขต us-central1) คือ

  • CPU/memory ($0.06608 / vCPU hour + $0.0112 / GB hour)
  • Storage ($0.0004109 per GB)
  • Networking (ingress ฟรี, egress ข้ามเขต $0.02/GB)

ที่มา - Google

Hiring! บริษัทที่น่าสนใจ

CP AXTRA Public Company Limited - Lotus's company cover
CP AXTRA Public Company Limited - Lotus's
CP AXTRA Lotus's is revolutionizing the retail industry as a Retail Tech company.
Token X company cover
Token X
Blockchain, ICO, Tokenization, Digital Assets, and Financial Service
Carmen Software company cover
Carmen Software
Hotel Financial Solutions
Next Innovation (Thailand) Co., Ltd. company cover
Next Innovation (Thailand) Co., Ltd.
We are web design with consulting & engineering services driven the future stronger and flexibility.
United Information Highway Co., Ltd. company cover
United Information Highway Co., Ltd.
UIH is Thailand’s leading Digital Infrastructure and Solution Provider for Business
KKP Dime company cover
KKP Dime
KKP Dime บริษัทในเครือเกียรตินาคินภัทร
Kiatnakin Phatra Financial Group company cover
Kiatnakin Phatra Financial Group
Financial Service
Fastwork Technologies company cover
Fastwork Technologies
Fastwork.co เว็บไซต์ที่รวบรวม ฟรีแลนซ์ มืออาชีพจากหลากหลายสายงานไว้ในที่เดียวกัน
Thoughtworks Thailand company cover
Thoughtworks Thailand
Thoughtworks เป็นบริษัทที่ปรึกษาด้านเทคโนโยลีระดับโลกที่คว้า Great Place to Work 3 ปีซ้อน
Iron Software company cover
Iron Software
Iron Software is an American company providing a suite of .NET libraries by engineer for engineers.
CLEVERSE company cover
CLEVERSE
Cleverse is a Venture Builder. Our team builds several tech companies.
Nipa Cloud company cover
Nipa Cloud
#1 OpenStack cloud provider in Thailand with our own data center and software platform.
CDG GROUP company cover
CDG GROUP
Provider of IT solutions to public, state, and private sectors in Thailand for over 56 years
Bangmod Enterprise company cover
Bangmod Enterprise
The leader in Cloud Server and Hosting in Thailand.
CIMB THAI Bank company cover
CIMB THAI Bank
MOVING FORWARD WITH YOU - CIMB is the leading ASEAN Bank
Bangkok Bank company cover
Bangkok Bank
Bangkok Bank is one of Southeast Asia's largest regional banks, a market leader in business banking
Gofive company cover
Gofive
“We create world-class software experience”
KBTG - KASIKORN Business-Technology Group company cover
KBTG - KASIKORN Business-Technology Group
KBTG - "The Technology Company for Digital Business Innovation"
Siam Commercial Bank Public Company Limited company cover
Siam Commercial Bank Public Company Limited
"Let's start a brighter career future together"
Icon Framework co.,Ltd. company cover
Icon Framework co.,Ltd.
Global Standard Platform for Real Estate แพลตฟอร์มสำหรับธุรกิจอสังหาริมทรัพย์ครบวงจร มาตรฐานระดับโลก
REFINITIV company cover
REFINITIV
The Financial and Risk business of Thomson Reuters is now Refinitiv
H LAB company cover
H LAB
Re-engineering healthcare systems through intelligent platforms and system design.
LTMH TECH company cover
LTMH TECH
LTMH TECH มุ่งเน้นการพัฒนาผลิตภัณฑ์ที่สามารถช่วยพันธมิตรของเราให้บรรลุเป้าหมาย
Seven Peaks company cover
Seven Peaks
We Drive Digital Transformation
Wisesight (Thailand) Co., Ltd. company cover
Wisesight (Thailand) Co., Ltd.
The Best Choice For Handling Social Media · High Expertise in Social Data · Most Advanced and Secure
MOLOG Tech company cover
MOLOG Tech
We are Modern Logistic Platform, Specialize in WMS, OMS and TMS.
Data Wow Co.,Ltd company cover
Data Wow Co.,Ltd
We enable our clients to realize increased productivity by solving their most complex issues by Data
LINE Company Thailand company cover
LINE Company Thailand
LINE, the world's hottest mobile messaging platform, offers free text and voice messaging + Call
LINE MAN Wongnai company cover
LINE MAN Wongnai
Join our journey to becoming No.1 food platform in Thailand
Apple
public://topics-images/apple_webp.png
SCB10X
public://topics-images/347823389_774095087711602_515970870797767330_n_webp.png
Windows 11
public://topics-images/hero-bloom-logo.jpg
Doom
public://topics-images/doom_logo.png
Huawei
public://topics-images/huawei_standard_logo.svg_.png
Threads
public://topics-images/threads-app-logo.svg_.png
Google Keep
public://topics-images/google_keep_2020_logo.svg_.png
Fortnite
public://topics-images/fortnitelogo.svg_.png
Instagram
public://topics-images/instagram_logo_2022.svg_.png
SCB
public://topics-images/9crhwyxv_400x400.jpg
Microsoft
public://topics-images/microsoft_logo.svg_.png
Basecamp
public://topics-images/bwpepdi0_400x400.jpg
Tinder
public://topics-images/hwizi8ny_400x400.jpg
FTC
public://topics-images/seal_of_the_united_states_federal_trade_commission.svg_.png
Pinterest
public://topics-images/pinterest.png
Palantir
public://topics-images/-nzsuc6w_400x400.png
Gemini
public://topics-images/google_gemini_logo.svg__0.png
AIS Business
public://topics-images/logo-business-2021-1.png
PostgreSQL
public://topics-images/images.png
JetBrains
public://topics-images/icx8y2ta_400x400.png
Krungthai
public://topics-images/aam1jxs6_400x400.jpg
Palworld
public://topics-images/mccyhcqf_400x400.jpg
Bill Gates
public://topics-images/bill_gates-september_2024.jpg
VMware
public://topics-images/1nj4i1gp_400x400.jpg
Take-Two Interactive
public://topics-images/0khle7nh_400x400.jpg
OpenAI
public://topics-images/ztsar0jw_400x400.jpg
Thailand
public://topics-images/flag_of_thailand.svg_.png
NVIDIA
public://topics-images/srvczsfq_400x400.jpg
ServiceNow
public://topics-images/ytnrfphe_400x400.png
PS5
public://topics-images/playstation_5_logo_and_wordmark.svg_.png
Klarna
public://topics-images/urcllpjp_400x400.png