Summary (สรุป)
ตามที่เราเห็นแล้ว ไม่ว่าคุณกำลังมองหา scaling ประเภทไหน microservice ให้ตัวเลือกที่แตกต่างกันมากมายในแง่ของวิธีที่คุณเข้าหาปัญหา
Scaling axis สามารถเป็นโมเดลที่มีประโยชน์เมื่อพิจารณาว่า scaling ประเภทไหนที่มีให้คุณใช้:
Vertical scaling
พูดง่ายๆ คือการหาเครื่องที่ใหญ่ขึ้น
Horizontal duplication
การมีหลายสิ่งที่สามารถทำงานเดียวกันได้
Data partitioning
การแบ่งงานตามคุณลักษณะของข้อมูล เช่น กลุ่มลูกค้า
Functional decomposition
การแยกงานตามประเภท เช่น การแยกเป็น microservice
กุญแจสำคัญของสิ่งนี้ส่วนใหญ่คือการเข้าใจว่าคุณต้องการอะไร—เทคนิคที่มีประสิทธิภาพในการ scale เพื่อพัฒนา latency อาจไม่มีประสิทธิภาพเท่ากันในการช่วย scale เพื่อรับมือปริมาณ
ผมหวังว่าผมได้แสดงให้เห็นด้วยว่า scaling หลายรูปแบบที่เราพูดถึงส่งผลให้ความซับซ้อนในระบบของคุณเพิ่มขึ้น ดังนั้นการเจาะจงในสิ่งที่คุณพยายามเปลี่ยนแปลงและหลีกเลี่ยงอันตรายของ premature optimization จึงสำคัญ
ต่อไป เราจะย้ายจากการดูสิ่งที่เกิดขึ้นเบื้องหลังไปสู่ส่วนที่มองเห็นได้ชัดเจนที่สุดของระบบเรา—user interface
1 Martin L. Abbott and Michael T. Fisher, The Art of Scalability: Scalable Web Architecture, Processes, and Organizations for the Modern Enterprise , 2nd ed. (New York: Addison-Wesley, 2015).
2 As before, I have anonymized the company—FoodCo isn't its real name!
3 Gregor Hohpe and Bobby Woolf, Enterprise Integration Patterns (Boston: Addison-Wesley, 2003).
4 Pramod J. Sadalage and Martin Fowler, NoSQL Distilled: A Brief Guide to the Emerging World of Polyglot Persistence (Upper Saddle River, NJ: Addison-Wesley 2012).
5 Don't get me started on people who start talking about hypotheses and then go about cherry-picking information to confirm their already-held beliefs.