GitHub

GitHub รายงานเหตุการณ์เว็บล่มเมื่อวันที่ 22 ตุลาคมที่ผ่านมา พร้อมกับระบุถึงบทเรียนที่ได้จากการล่มครั้งนี้

เรื่องทั้งหมดเริ่มจากการบำรุงรักษาอุปกรณ์ไฟเบอร์ 100G ที่เริ่มทำงานไม่เต็มประสิทธิภาพ โดยการเปลี่ยนอุปกรณ์ทำให้เน็ตเวิร์คที่เชื่อมระหว่างศูนย์ข้อมูลหลัก คือฝั่งตะวันตก (US West) และฝั่งตะวันออก (US East) ดับไปเป็นเวลา 43 วินาที

ระบบฐานข้อมูลของ GitHub ใช้คลัสเตอร์ MySQL โดยก่อนเน็ตเวิร์คดับ เซิร์ฟเวอร์หลัก (primary) ที่รับข้อมูลเขียนฐานข้อมูลอยู่ที่ US East โดยคลัสเตอร์ถูกควบคุมด้วย Orchestrator ของ GitHub เอง เมื่อเน็ตเวิร์คดับไป ตัว Orchestrator ก็พยายามเลือกเซิร์ฟเวอร์ในศูนย์ข้อมูล US West เป็นเซิร์ฟเวอร์หลักใหม่ และส่งข้อมูลการเขียนลงฐานข้อมูลไปยัง US West อย่างไรก็ตาม มีข้อมูลการเขียนส่วนหนึ่งที่ US East เขียนไปแล้ว ไม่กี่วินาที แต่ US West ไม่ได้รับ ทำให้คลัสเตอร์ไม่สามารถกลับมาซิงก์กันได้

ทีมงานตัดสินใจหยุดงานที่ต้องเขียนลงฐานข้อมูล เช่น การรับ push เพื่อรักษาความถูกต้องของข้อมูลเอาไว้ โดยสถานะสุดท้ายคือ US West มีข้อมูลที่ US East ไม่มีอยู่นาน 40 นาที ขณะที่ US East มีข้อมูลที่ US West ไม่มีอยู่ไม่กี่วินาที

หลังจากนั้นทางออกคือการสร้างคลัสเตอร์ขึ้นใหม่จากไฟล์แบ็กอัพ กระบวนการ restore ฐานข้อมูลขนาดใหญ่ปกติก็ใช้เวลาหลายชั่วโมงอยู่แล้ว แม้นโยบายของ GitHub จะสำรองฐานข้อมูลทุก 4 ชั่วโมงและทดสอบไฟล์สำรองอย่างน้อยวันละครั้ง แต่ก็ไม่เคยมีการซ้อมสร้างคลัสเตอร์ใหม่ทั้งหมดจริงๆ ทำให้ใช้เวลานาน และหลังจากกู้เรียบร้อยแล้วก็ยังต้องวิเคราะห์ล็อก MySQL ว่ามีข้อมูลอะไรผิดพลาดหรือไม่

ทาง GitHub ระบุว่าหลังจากนี้จะคอนฟิก Orchestrator ใหม่ ให้เลี่ยงการเลือกเซิร์ฟเวอร์หลักข้ามทวีป ซึ่งทำให้คลัสเตอร์แยกเป็นสองส่วนในครั้งนี้ ทาง GitHub เชื่อว่าการย้ายเซิร์ฟเวอร์หลักในโซนเดียวกันโดยปกติค่อนข้างปลอดภัย

ในระยะยาว ทางบริษัทมีแนวทางจะออกแบบให้ระบบทนทานมากขึ้นโดยเตรียมออกแบบ active/active/active แนวคิดคือศูนย์ข้อมูลหนึ่งสามารถล่มไปทั้งศูนย์ได้โดยผู้ใช้ยังไม่ได้รับผลกระทบ

ที่มา - GitHub Blog

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

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.
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.
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
MuvMi (Urban Mobility Tech Co.,Ltd.) company cover
MuvMi (Urban Mobility Tech Co.,Ltd.)
Shape the future of urban mobility towards affordable, clean, and safe solutions
T.N. Digital Solution Co., Ltd. company cover
T.N. Digital Solution Co., Ltd.
TNDS has been involving in every first move of banking’s major digital transformation.
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.
The Gang Technology Co., Ltd. company cover
The Gang Technology Co., Ltd.
We're a Digital Agency that helps our customers transform their business into digital with ease.
LTMH company cover
LTMH
LTMH มุ่งเน้นการพัฒนาผลิตภัณฑ์ที่สามารถช่วยพันธมิตรของเราให้บรรลุเป้าหมาย
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

ยังไงมันก็ต้องล่มอยู่ดีอะครับ เพราะ primary มันมีได้ที่เดียว split brain เมื่อไรก็ต้องหยุด

ระหว่างสั่ง down ฝั่ง slave vs. ปล่อยให้มันจัดการเอง ถ้าทำได้ก็ควรเลือกสั่ง down ครับ

งั้นแสดงว่า active/passive แบบเปลี่ยน mode เป็น passive/active ได้ ไม่ work สิครับ เพราะเกิดปัญหาแบบนี้ จะทำให้ข้อมูลไม่ตรงกัน

แต่ถ้า active/passive แบบไม่ต้องเปลี่ยน mode แล้วถ้าข้อมูลไม่ตรง ก็แค่ สร้าง passive ตัวใหม่ ขึ้นมา หรือเปล่าครับ