‹

10 · Distributed Systems

10 · Distributed Systems

10 · ​ระบบ​กระจาย

This chapter is the floor where "the computer" stops being a noun — the machine is now many machines, and the abstraction of one is something you have to build.

​ชั้นนี้​คือ​ที่​ที่ "​คอมพิวเตอร์" ​เลิก​เป็น​คำนาม​เดี่ยว — ​เครื่อง​กลายเป็น​หลาย​เครื่อง ​และ​นามธรรม (abstraction) ​ของ​การเป็นหนึ่งเดียว​คือ​ของ​ที่​ต้อง​สร้าง​เอง

What breaks when there is no "now"?

​ไม่​มี "​ตอนนี้" ​แล้ว​อะไร​พัง

At 22:52 UTC on 21 October 2018, engineers replacing failing optical equipment briefly severed the link between GitHub's East Coast network hub and its primary East Coast data center. Connectivity was restored in forty-three seconds. In those seconds the system that keeps the databases healthy did exactly what it was built to do: unable to reach the East Coast primaries, it promoted replicas on the West Coast. Writes had by then been accepted on both coasts. Neither side was wrong, neither could be discarded, and reconciling them took twenty-four hours and eleven minutes (GitHub post-incident analysis).

​สาย​ที่​ขาด​ไป 43 ​วินาที ​ทำให้ GitHub ​ต้อง​ใช้เวลา 24 ​ชั่วโมง 11 ​นาที ​ตาม​เก็บกวาด ​เวลา 22:52 UTC ​วันที่ 21 ​ตุลาคม 2018 ​วิศวกร​กำลัง​ถอด​เปลี่ยน​อุปกรณ์​ใยแก้ว​นำ​แสง​ที่​เสีย ​และ​ตัด​ลิงก์​ระหว่าง​ศูนย์​เครือข่าย​ฝั่ง​ตะวันออก​ของ GitHub ​กับ​ดาต้า​เซ็นเตอร์​หลัก​ฝั่ง​ตะวันออก​ไป​ชั่วขณะ ​ใน​ช่วงเวลา​นั้น​เอง ​ระบบ​ที่​คอย​ดูแล​สุขภาพ​ของ​ฐานข้อมูล​ทำงาน​ตามที่​ถูก​สร้าง​มา​ให้​ทำ​เป๊ะๆ — ​ติดต่อ primary ​ฝั่ง​ตะวันออก​ไม่​ได้ ​มัน​จึง​เลื่อน replica ​ฝั่ง​ตะวันตก​ขึ้น​เป็น primary ​แทน ​ถึง​ตอนนั้น​ข้อมูล​ถูก​เขียน​รับ​เข้าไป​แล้ว​ทั้งสอง​ฝั่ง ​ไม่​มี​ฝั่ง​ไหน​ผิด ​ไม่​มี​ฝั่ง​ไหน​ทิ้ง​ได้ ​และ​การประสาน​ทั้งสอง​ฝั่ง​ให้​ตรงกัน​ใหม่​กินเวลา​ไป​เท่านั้น (GitHub post-incident analysis)

Nothing failed. That is the shape of every hard problem on this floor. The link came back, the machines were healthy, the failover logic was correct — and the system still could not say what had happened, because for forty-three seconds there was no shared answer to the question what is true right now.

​ไม่​มี​อะไร​พัง​สัก​อย่าง ​นั่น​คือ​รูปร่าง​ของ​ปัญหา​ยาก​ทุก​ข้อ​บน​ชั้นนี้ ​ลิงก์​กลับมา ​เครื่อง​ทุก​เครื่อง​แข็งแรง​ดี ​ตรรกะ failover ​ก็​ถูกต้อง ​แต่​ระบบ​ยัง​บอก​ไม่​ได้​ว่า​เกิด​อะไร​ขึ้น ​เพราะ​ตลอด 43 ​วินาที​นั้น​ไม่​มี​คำตอบ​ร่วมกัน​สัก​คำตอบ​เดียว​สำหรับ​คำถาม​ว่า ​ตอนนี้​อะไร​คือ​ความจริง

Start with why that question has no easy answer. Two machines have two clocks, clocks drift, and no amount of care makes a timestamp from one comparable with a timestamp from the other. Leslie Lamport's response, in 1978, was to stop asking for time and ask only for order. His "happened before" relation says one event precedes another if they occur in sequence on the same machine, or if the first is the sending of a message and the second its receipt — plus whatever follows by chaining those together. Everything else is concurrent: genuinely unordered, so that any consistent story about which came first is as good as any other (Lamport, CACM 21(7), 1978). Physics reached this first: simultaneity is not absolute, and the only real ordering is the one causation can carry. In a distributed system, messages are the light cones.

​คำถาม​นั้น​ไม่​มี​คำตอบ​ง่ายๆ ​เพราะ​เครื่อง​สอง​เครื่อง​มี​นาฬิกา​สอง​เรือน ​นาฬิกา​เหวี่ยง​ออกจาก​กัน ​และ​ต่อให้​ระวัง​แค่​ไหน timestamp ​ของ​เครื่อง​หนึ่ง​ก็​เทียบ​กับ​ของ​อีก​เครื่อง​ไม่​ได้ Leslie Lamport ​ตอบ​เรื่อง​นี้​ใน​ปี 1978 ​ด้วย​การเลิก​ถามหา​เวลา ​เหลือ​ถามหา​แค่ ​ลำดับ ​ความสัมพันธ์ "happened-before" ​ของ​เขา​บอก​ว่า​เหตุการณ์​หนึ่ง​เกิด​ก่อน​อีก​เหตุการณ์​ก็ต่อเมื่อ​ทั้งคู่​เกิด​ตามลำดับ​บน​เครื่อง​เดียวกัน ​หรือ​เหตุการณ์​แรก​คือ​การส่ง​ข้อความ​และ​เหตุการณ์​หลัง​คือ​การรับ​ข้อความ​นั้น ​บวก​กับ​อะไรก็ตาม​ที่​ไล่​ต่อกัน​เป็น​สาย​จาก​สอง​แบบนี้ ​ที่​เหลือ​ทั้งหมด​คือ concurrent — ​ไม่​มี​ลำดับ​จริง ​เรื่องเล่า​ที่​สอดคล้องกัน​เอง​แบบ​ไหน​ก็ตาม​ว่า​อะไร​มา​ก่อน ​ย่อม​ดี​เท่ากัน​หมด (Lamport, CACM 21(7), 1978) ​ฟิสิกส์​ถึง​ข้อสรุป​นี้​ก่อน: ​ความพร้อม​กัน​ไม่​ใช่​สิ่ง​สัมบูรณ์ ​ลำดับ​ที่แท้​จริง​มี​แค่​ลำดับ​ที่​ความเป็นเหตุเป็นผล​พา​ไป​ได้ ​ใน​ระบบ​กระจาย ​ข้อความ​คือ light cone

The second difficulty is worse, because no formalism softens it. On one machine a component either works or has crashed. Across machines there is a third state indistinguishable from the other two: no answer yet. A silent peer may be dead, overloaded, or healthy behind a broken link, and no timeout separates these: a timeout says the answer has not arrived, never that it will not. Lamport's much-quoted definition captures what this does to the experience of building anything: "A distributed system is one in which the failure of a computer you didn't even know existed can render your own computer unusable" (Lamport, 28 May 1987). Failure here is not an event. It is an ambiguity.

​ปัญหา​ที่สอง​หนัก​กว่า ​เพราะ​ไม่​มี​รูปแบบ​ทาง​คณิตศาสตร์​ไหน​ช่วย​ผ่อน​มัน​ได้ ​บน​เครื่อง​เดียว ​คอม​โพ​เนนต์​หนึ่ง​ไม่​ทำงาน​อยู่​ก็​ล่ม​ไป​แล้ว ​ข้าม​เครื่อง​กัน​มี​สถานะ​ที่สาม​ที่​แยกจาก​สอง​แบบ​แรก​ไม่​ออก ​คือ ​ยัง​ไม่​มี​คำตอบ ​เพื่อน​ร่วม​เครือข่าย​ที่​เงียบ​ไป​อาจ​ตาย​แล้ว ​อาจ​โหลด​เกิน ​หรือ​อาจ​แข็งแรง​ดีแต่​อยู่​หลัง​ลิงก์​ที่​ขาด ​ไม่​มี timeout ​ไหน​แยก​สาม​อย่างนี้​ออกจาก​กัน — timeout ​บอก​ได้​แค่​ว่า​คำตอบ​ยัง​ไม่​มา ​ไม่​เคย​บอก​ว่า​มัน​จะ​ไม่​มา ​นิยาม​ที่​ถูก​อ้าง​บ่อย​ที่สุด​ของ Lamport ​จับภาพ​ว่า​เรื่อง​นี้​ทำ​อะไร​กับ​ประสบการณ์​การสร้าง​ของ​ทุกอย่าง — "​ระบบ​กระจาย​คือ​ระบบ​ที่​ความล้มเหลว​ของ​คอมพิวเตอร์​เครื่อง​หนึ่ง​ซึ่ง​คุณ​ไม่​รู้​ด้วยซ้ำ​ว่า​มี​อยู่ ​สามารถ​ทำให้​คอมพิวเตอร์​ของ​คุณ​เอง​ใช้งาน​ไม่​ได้" (A distributed system is one in which the failure of a computer you didn't even know existed can render your own computer unusable) (Lamport, 28 May 1987) ​ความล้มเหลว​ตรงนี้​ไม่​ใช่​เหตุการณ์ ​มัน​คือ​ความกำกวม

Given ambiguity, can machines at least agree on one value — which replica is primary, which transaction committed, who holds the lock? This is the consensus problem, and it is the hardest thing here. Fischer, Lynch and Paterson proved in 1985 that in an asynchronous system, where messages can be delayed arbitrarily, no deterministic protocol can guarantee that all correct processes decide if even one process may crash (JACM 32(2): 374–382). The proof is not about bad engineering. It is the impossibility of telling a dead process from a slow one, elevated into a theorem.

​อยู่​กับ​ความกำกวม​แบบ​นั้น ​เครื่อง​ต่างๆ ​ยัง​พอ​ตกลง​กัน​ได้​สัก​ค่า​เดียว​ไหม — replica ​ไหน​คือ primary, transaction ​ไหน commit ​แล้ว, ​ใคร​ถือ lock ​อยู่? ​นี่​คือ​ปัญหา ​ฉันทา​มติ (consensus) ​และ​มัน​คือ​เรื่อง​ยาก​ที่สุด​บน​ชั้นนี้ Fischer, Lynch ​และ Paterson ​พิสูจน์​ไว้​ใน​ปี 1985 ​ว่า​ใน​ระบบ​อะ​ซิง​โครนัส (asynchronous) ​ที่​ข้อความ​ถูก​หน่วง​ได้​นาน​เท่าไร​ก็ได้ ​ไม่​มี​โพรโทคอล​เชิง​กำหนด​แน่นอน (deterministic) ​ตัว​ไหน​รับประกัน​ได้​ว่า​โพรเซส​ที่​ถูกต้อง​ทุก​ตัว​จะ​ตัดสินใจ​ได้ ​ถ้า​มี​แม้แต่​โพรเซส​เดียว​ที่​อาจ​ล่ม (JACM 32(2): 374–382) ​บทพิสูจน์​นี้​ไม่​ได้​ว่าด้วย​วิศวกรรม​ที่​แย่ ​มัน​คือ​การยก​ความเป็นไป​ไม่​ได้ที่​จะ​แยก​โพรเซส​ที่​ตาย​แล้ว​ออกจาก​โพรเซส​ที่​แค่​ช้า ​ขึ้น​เป็น​ทฤษฎีบท

Working systems live inside that result. Paxos, and Raft after it, never sacrifice safety — they will not decide two different values. What they give up is the promise to decide promptly: during a bad enough network they make no progress, and when it recovers, they do. Lamport submitted Paxos in 1990 as an archaeological account of a fictional Greek parliament, and it went unpublished for eight years while reviewers puzzled over the joke (ACM TOCS 16(2), 1998); he later wrote a four-page version, "Paxos Made Simple". Diego Ongaro and John Ousterhout's Raft made understandability an explicit design goal and won a best-paper award for it (USENIX ATC '14). GitHub's failover ran on Raft. Raft did not malfunction; it agreed, correctly and quickly, on the wrong thing.

​ระบบ​ที่​ใช้งาน​จริงอยู่​ภายใน​ผลลัพธ์​นั้น Paxos ​และ Raft ​ที่​ตามมา ​ไม่​ยอม​เสีย ​ความปลอดภัย ​เด็ดขาด — ​มัน​จะ​ไม่​ตัดสินใจ​ไป​ที่​ค่า​สอง​ค่าที่​ต่างกัน ​สิ่ง​ที่​ยอม​เสีย​คือ​คำมั่น​ว่า​จะ​ตัดสินใจ​ได้ ​ทันท่วงที ​ระหว่าง​ที่​เครือข่าย​แย่มาก​พอ ​มัน​ไม่​คืบหน้า​เลย ​พอ​เครือข่าย​กลับมา​ดี ​มัน​ก็​เดินหน้า​ต่อ Lamport ​ส่ง Paxos ​เข้า​ตีพิมพ์​ใน​ปี 1990 ​ใน​รูป​รายงาน​เชิง​โบราณคดี​ว่าด้วย​รัฐสภา​กรีก​ที่​แต่ง​ขึ้น ​และ​มัน​ค้าง​อยู่​แปด​ปี​เพราะ​ผู้ตรวจ​ทาน​งง​กับ​มุก​นั้น (ACM TOCS 16(2), 1998) ​ภายหลัง​เขา​เขียน​ฉบับ​สี่​หน้า​ชื่อ "Paxos Made Simple" Raft ​ของ Diego Ongaro ​และ John Ousterhout ​ตั้งเป้า​การออกแบบ​ไว้​ตรงๆ ​ว่า​ต้อง​เข้าใจง่าย ​และ​คว้ารางวัล best paper ​มาจาก​เป้า​นั้น (USENIX ATC '14) failover ​ของ GitHub ​วิ่ง​อยู่​บน Raft ​และ Raft ​ไม่​ได้​ทำงาน​ผิด ​มัน​ตกลง​กัน​ได้ ​ถูกต้อง​และ​รวดเร็ว ​บน​เรื่อง​ที่​ผิด

Because consensus costs round trips, systems trade it away. Eric Brewer proposed in a July 2000 keynote that consistency, availability and partition tolerance cannot all be had (PODC keynote); Seth Gilbert and Nancy Lynch made the conjecture a theorem in 2002 (SIGACT News 33(2)). The popular reading — pick two of three — is wrong, and Brewer said so twelve years later: partitions are a fact of networks, not a design choice, so the only real decision is what to do during one, and it can be made differently for different operations (IEEE Computer 45(2), 2012). Refuse writes on both sides and stay consistent; accept them and stay available. GitHub's day of repair is the bill for the second option.

​ฉันทา​มติ​มี​ต้นทุน​เป็น round trip ​ระบบ​จำนวนมาก​จึง​ยอม​แลก​มัน​ทิ้ง Eric Brewer ​เสนอ​ไว้​ใน​คีย์​โน้ต​เดือน​กรกฎาคม 2000 ​ว่าความ​สอดคล้อง (consistency) ​ความพร้อม​ใช้งาน (availability) ​และ​การทน​ต่อ​การแยก​ขาด​ของ​เครือข่าย (partition tolerance) ​ไม่​มีทาง​ได้​ครบ​สาม​อย่าง​พร้อมกัน (PODC keynote) Seth Gilbert ​กับ Nancy Lynch ​ยก​ข้อสันนิษฐาน​นี้​ขึ้น​เป็น​ทฤษฎีบท​ใน​ปี 2002 (SIGACT News 33(2)) ​แต่​คำ​อ่าน​ยอดนิยม — ​เลือก​ได้​สอง​ใน​สาม — ​ผิด ​และ Brewer ​พูด​เอง​สิบสอง​ปี​ให้หลัง ​การแยก​ขาด​ของ​เครือข่าย​เป็น​ข้อเท็จจริง​ของ​เครือข่าย ​ไม่​ใช่​ทางเลือก​ใน​การออกแบบ ​สิ่ง​ที่​ตัดสินใจ​ได้​จริง​จึง​มี​อย่าง​เดียว ​คือ​จะ​ทำ​อะไร ​ระหว่าง​ที่ ​มัน​เกิดขึ้น ​และ​แต่ละ​ปฏิบัติการ​เลือก​คำตอบ​ต่างกัน​ได้ (IEEE Computer 45(2), 2012) ​ปฏิเสธ​การเขียน​ทั้งสอง​ฝั่ง ​แล้ว​รักษา​ความสอดคล้อง​ไว้ ​หรือ​รับ​การเขียน​ไว้ ​แล้ว​รักษา​ความพร้อม​ใช้งาน​ไว้ ​วัน​ซ่อม​ของ GitHub ​คือ​บิล​ของ​ทางเลือก​ที่สอง

So consistency became a menu rather than a property. At the strict end is linearizability — every operation appears to take effect at a single instant between its start and its finish, which is to say the system successfully pretends to be one machine (Herlihy & Wing, ACM TOPLAS 12(3), 1990). At the loose end is eventual consistency: replicas may disagree now and will converge if you stop writing (Vogels, CACM 52(1), 2009). Between them lies a long spectrum, and choosing a point on it is the central architectural decision of any system spanning a building, let alone a planet.

​ความสอดคล้อง​จึง​กลายเป็น​เมนู ​ไม่​ใช่​คุณสมบัติ​ตายตัว ​ปลาย​ด้าน​เข้มงวด​คือ linearizability — ​ทุก​ปฏิบัติการ​ดูเหมือน​มีผล​ขึ้น​ใน​จุด​เดียว​ระหว่าง​จุดเริ่ม​กับ​จุดจบ​ของ​มัน ​พูด​อีก​อย่าง​คือ​ระบบ​แกล้ง​เป็น​เครื่อง​เดียว​ได้​สำเร็จ (Herlihy & Wing, ACM TOPLAS 12(3), 1990) ​ปลาย​ด้าน​หลวม​คือ eventual consistency: replica ​ไม่​ตรงกัน​ตอนนี้​ได้ ​และ​จะ​ลู่เข้า​หา​กัน​ถ้า​หยุด​เขียน (Vogels, CACM 52(1), 2009) ​ระหว่าง​สอง​ปลาย​คือ​สเปกตรัม​ยาวเหยียด ​การเลือก​จุด​หนึ่ง​บน​นั้น​คือ​การตัดสินใจ​เชิง​สถาปัตยกรรม​ที่​สำคัญ​ที่สุด​ของ​ระบบ​ใด​ก็ตาม​ที่​กว้าง​เกิน​ตึก​เดียว ​ไม่ต้อง​พูดถึง​กว้าง​เท่า​ดาวเคราะห์

One more move is available: buy "now" back with hardware. Google's Spanner equips its data centers with GPS receivers and atomic clocks, and its TrueTime interface reports not a timestamp but an interval — the uncertainty ε "varies from about 1 to 7 ms over each poll interval," roughly 4 ms most of the time (OSDI 2012). A transaction that must be globally ordered waits out the uncertainty before committing. It is the most literal illustration of the tower: a floor that could not assume a global clock bought one, in satellites, and sold the result upward as an ordinary database.

​ยังมี​อีก​ท่า​หนึ่ง ​คือ​ซื้อ "​ตอนนี้" ​กลับมา​ด้วย​ฮาร์ดแวร์ Spanner ​ของ Google ​ติดเครื่อง​รับ GPS ​และ​นาฬิกา​อะตอม​ไว้​ใน​ดาต้า​เซ็นเตอร์​ของ​ตัวเอง ​และ​อินเทอร์เฟซ TrueTime ​รายงาน​ออกมา​ไม่​ใช่ timestamp ​แต่​เป็น ​ช่วง (interval) — ​ความไม่แน่นอน ε "​แกว่ง​อยู่​ราว 1 ​ถึง 7 ​มิล​ลิ​วินาที​ต่อ​รอบ​โพล" (varies from about 1 to 7 ms over each poll interval) ​ราว 4 ​มิล​ลิ​วินาที​ใน​เวลา​ส่วนใหญ่ (OSDI 2012) transaction ​ที่​ต้อง​เรียงลำดับ​กัน​ทั่วโลก​จะ​รอ​ให้​ความไม่แน่นอน​นั้น​หมด​ไป​ก่อน​ค่อย commit ​นี่​คือ​ภาพ​หอคอย​ที่​ตรงตัว​ที่สุด: ​ชั้น​ที่​สมมติ​เรื่อง​นาฬิกา​กลาง​ไม่​ได้ ​ก็​ซื้อ​นาฬิกา​กลาง​มา​เอง​ด้วย​ดาวเทียม ​แล้ว​ขาย​ผลลัพธ์​ขึ้น​ชั้นบน​ใน​รูป​ฐานข้อมูล​ธรรมดา

The oldest warning here is still the most useful. Around 1994 Peter Deutsch listed the false assumptions newcomers make — the network is reliable, latency is zero, bandwidth is infinite, the network is secure, topology doesn't change, there is one administrator, transport cost is zero — and James Gosling later added the eighth, that the network is homogeneous (Gosling). Each is a place where the abstraction of "one machine" leaks, and every large outage of the last thirty years is a receipt for one of them.

​คำเตือน​ที่​เก่าแก่​ที่สุด​ใน​เรื่อง​นี้​ยัง​ใช้ได้​ดี​ที่สุด ​ราว​ปี 1994 Peter Deutsch ​ไล่​รายการ​ความเชื่อ​ผิดๆ ​ของ​คน​มา​ใหม่ — ​เครือข่าย​เชื่อถือได้ ​ความหน่วง​เป็น​ศูนย์ ​แบนด์วิดท์​ไม่​จำกัด ​เครือข่าย​ปลอดภัย ​โท​โพ​โล​ยี​ไม่​เปลี่ยน ​มี​ผู้ดูแล​ระบบ​คนเดียว ​ต้นทุน​การส่ง​ข้อมูล​เป็น​ศูนย์ — ​และ James Gosling ​เติม​ข้อ​ที่​แปด​ใน​ภายหลัง​ว่า​เครือข่าย​เป็นเนื้อเดียวกัน​หมด (Gosling) ​แต่ละ​ข้อ​คือ​จุด​ที่ abstraction ​ของ "​เครื่อง​เดียว" ​รั่ว ​และ​เหตุขัดข้อง​ครั้ง​ใหญ่​ทุกครั้ง​ใน​สามสิบ​ปี​ที่ผ่านมา​คือ​ใบเสร็จ​ของ​ข้อ​ใด​ข้อ​หนึ่ง

Connections

​เชื่อมโยง

Below: chapter 09 supplies the messages and, crucially, their unreliability — this floor exists because that one cannot promise delivery. Chapter 05 owns concurrency within one machine, where locks work and failure is unambiguous; the gap between them is exactly what shared memory was buying. Chapter 08 supplies the guarantees traded away here. Above: chapter 07 pays the operational cost of every decision on this floor; chapter 11 replaces "machines may crash" with "machines may lie," a strictly harder problem; chapter 12 trains its models on clusters that are distributed systems in every respect above.

​ชั้นล่าง: ​บท​ที่ 09 ​ส่ง​ข้อความ​มา​ให้ ​และ​ที่​สำคัญ​กว่า​นั้น ​ส่ง​ความไม่​น่าเชื่อถือ​ของ​ข้อความ​มา​ด้วย — ​ชั้นนี้​มี​อยู่​ได้​เพราะ​ชั้น​นั้น​รับประกัน​การส่ง​ถึง​ไม่​ได้ ​บท​ที่ 05 ​ถือ​เรื่อง​การทำงาน​พร้อมกัน​ภายใน​เครื่อง​เดียว ​ที่​ที่ lock ​ใช้ได้​จริง​และ​ความล้มเหลว​ไม่​กำกวม ​ช่องว่าง​ระหว่าง​สอง​บท​คือ​สิ่ง​ที่​หน่วยความจำ​ร่วม (shared memory) ​เคย​ซื้อ​ไว้​ให้​พอดี ​บท​ที่ 08 ​ส่ง​การรับประกัน (guarantee) ​ที่​ถูก​แลก​ทิ้ง​ตรงนี้​มา​ให้ ​ชั้นบน: ​บท​ที่ 07 ​จ่าย​ต้นทุน​ด้าน​ปฏิบัติการ​ของ​ทุก​การตัดสินใจ​บน​ชั้นนี้ ​บท​ที่ 11 ​เปลี่ยน "​เครื่อง​อาจ​ล่ม" ​เป็น "​เครื่อง​อาจ​โกหก" ​ซึ่ง​ยาก​กว่า​เดิม​อย่าง​เคร่งครัด ​บท​ที่ 12 ​เท​รน​โมเดล​บน​คลัสเตอร์​ที่​เป็นระบบ​กระจาย​ใน​ทุก​แง่มุม​ข้างต้น

Open questions

​คำถาม​ที่​ยัง​เปิด​อยู่

Is consensus getting cheaper? Tight clock synchronization and fast data-center networks have narrowed the gap between the theory's worst case and the common one, and how much of the CAP trade is fundamental rather than an artifact of 2000-era networks is unsettled. Second: consistency models are precise but not intuitive, and most production bugs here come from engineers reasoning about a model they could define but not feel. Third, and largest: partial failure is the one thing no abstraction has ever fully hidden — every attempt to make a remote call look local has leaked. A flaw awaiting a fix, or the honest shape of the world showing through?

​ฉันทา​มติ​กำลัง​ถูก​ลง​ไหม? ​การซิงก์​นาฬิกา​ที่​แม่น​ขึ้น​และ​เครือข่าย​ดาต้า​เซ็นเตอร์​ที่​เร็ว​ขึ้น​ทำให้​ช่องว่าง​ระหว่าง​กรณี​แย่​สุด​ตาม​ทฤษฎี​กับ​กรณี​ที่​พบ​จริง​แคบ​ลง ​และ​ยัง​ไม่​มี​ข้อสรุป​ว่าการ​แลก​แบบ CAP ​เป็นเรื่อง​พื้นฐาน​แค่​ไหน ​หรือ​เป็น​แค่​ร่องรอย​ของ​เครือข่าย​ยุค 2000 ​ข้อ​ที่สอง: ​แบบจำลอง​ความสอดคล้อง (consistency model) ​แม่นยำ​แต่​ไม่​ตรง​สัญชาตญาณ ​และ​บั๊ก​ส่วนใหญ่​ใน​งาน​จริง​ตรงนี้​มาจาก​วิศวกร​ที่​ให้เหตุผล​กับ​แบบจำลอง​ที่​ตัวเอง​นิยาม​ได้​แต่​รู้สึก​ไม่​ได้ ​ข้อ​ที่สาม ​และ​ใหญ่​ที่สุด: ​ความล้มเหลว​บางส่วน (partial failure) ​คือ​สิ่ง​เดียว​ที่​ไม่​มี abstraction ​ไหน​เคย​ซ่อน​ได้​มิด — ​ทุก​ความพยายาม​ทำให้​การเรียก​ข้าม​เครื่อง​ดูเหมือน​เรียก​ใน​เครื่อง​เดียวกัน ​ล้วน​รั่ว​มา​แล้ว ​นี่​คือ​ข้อบกพร่อง​ที่​รอ​การแก้ ​หรือ​คือ​รูปร่าง​ที่แท้​จริง​ของ​โลก​ที่​โผล่​ออกมา​ให้​เห็น?

Go deeper

​อ่าน​ต่อ

  • Leslie Lamport, "Time, Clocks, and the Ordering of Events in a Distributed System," Communications of the ACM 21, no. 7 (1978): 558–565 — eight pages under everything above; award citation and links.
  • Fischer, Lynch & Paterson, "Impossibility of Distributed Consensus with One Faulty Process," JACM 32, no. 2 (1985): 374–382 — the boundary of the possible; award citation.
  • Maarten van Steen & Andrew S. Tanenbaum, Distributed Systems, 4th ed., 2023 — free PDF at distributed-systems.net. For the practitioner's view, Kleppmann & Riccomini, Designing Data-Intensive Applications, 2nd ed., O'Reilly, 2026.
  • Leslie Lamport, "Time, Clocks, and the Ordering of Events in a Distributed System," Communications of the ACM 21, no. 7 (1978): 558–565 — ​แปด​หน้าที่​รองรับ​ทุกอย่าง​ข้างต้น​อยู่​ข้างใต้; award citation and links
  • Fischer, Lynch & Paterson, "Impossibility of Distributed Consensus with One Faulty Process," JACM 32, no. 2 (1985): 374–382 — ​เส้น​แบ่ง​ของ​สิ่ง​ที่​เป็นไปได้; award citation
  • Maarten van Steen & Andrew S. Tanenbaum, Distributed Systems, 4th ed., 2023 — PDF ​ฟรี​ที่ distributed-systems.net ​ถ้า​อยากได้​มุมมอง​แบบ​คน​ทำงาน​จริง ​อ่าน Kleppmann & Riccomini, Designing Data-Intensive Applications, 2nd ed., O'Reilly, 2026
บทถัดไป · 12 / 1611 · Security & Cryptography
Size
Page
Font

The Tower of Abstractions — An Encyclopedia of the Computing Disciplines

❦
100 · The Map00 · แผนที่201 · Theory of Computation01 · ทฤษฎีการคำนวณ302 · Algorithms & Data Structures02 · อัลกอริทึมและโครงสร้างข้อมูล403 · Information & Coding03 · สารสนเทศและการเข้ารหัส504 · Computer Architecture04 · สถาปัตยกรรมคอมพิวเตอร์605 · Operating Systems05 · ระบบปฏิบัติการ706 · Languages & Compilers06 · ภาษาและคอมไพเลอร์807 · Software Engineering07 · วิศวกรรมซอฟต์แวร์908 · Databases08 · ฐานข้อมูล1009 · Networks09 · เครือข่าย1110 · Distributed Systems10 · ระบบกระจาย1211 · Security & Cryptography11 · ความปลอดภัยและวิทยาการรหัสลับ1312 · AI & Machine Learning12 · ปัญญาประดิษฐ์และการเรียนรู้ของเครื่อง1413 · HCI & Graphics13 · ปฏิสัมพันธ์มนุษย์–คอมพิวเตอร์ และกราฟิกส์1514 · The Frontier14 · พรมแดน1699 · Closing — The Tower, Seen Whole99 · ปิดเล่ม — หอคอยเมื่อมองทั้งหลัง