Role & Estimation
The Solution Architect Role & a Design Method
Role ของ Solution Architect / Principal Engineer ตั้งแต่ pre-sales จนถึง delivery, discovery workshop, การแปลง NFRs เป็นตัวเลข และ design method 4 steps ที่ใช้ได้ทั้งกับลูกค้าจริงและ system design interview
ลูกค้าเดินเข้ามาพร้อมประโยคเดียว: “อยากได้ระบบที่ รองรับ flash sale ได้” งานของ solution architect คือเปลี่ยนประโยคนั้นเป็น design ที่ build ได้จริง มี architecture ชัด trade-offs ชัด estimate ที่สมเหตุสมผล และทางไปถึง production ที่ทำได้จริง บทนี้วาง method ที่จะใช้ทั้ง course
The role: from whiteboard to production
Role นี้อยู่ตรงกลางระหว่าง pre-sales และ delivery
| ช่วง | งานหลัก | Deliverables |
|---|---|---|
| Discovery | workshop กับ business และ tech leaders หา goals, constraints, pain points | requirements, NFRs, assumptions |
| Solution shaping | ออกแบบ options และเลือก recommendation พร้อม trade-offs | architecture diagrams, ADRs |
| Pursuit | ประมาณ effort, cost และ risks, เขียน technical section ของ proposal หรือ RFP response | estimates, proposal |
| De-risking | สร้าง PoC หรือ technical spike เพื่อพิสูจน์ส่วนที่เสี่ยงที่สุดก่อน commit | PoC report |
| Handover | ส่ง design ให้ delivery team และช่วงแรกของ implementation | design doc, design clinics |
จุดที่ต่างจาก architect ที่ทำแต่ document คือ hands-on: ต้องอธิบายได้ว่าระบบทำงานจริงอย่างไร at scale, เมื่อมี failure และภายใต้ constraints จริง ไม่ใช่วาดกล่องสวย ๆ
A 4-step design method
ใช้ลำดับเดิมทุกครั้ง ไม่ว่าจะเป็น workshop กับลูกค้าหรือ system design interview 45 นาที
| Step | ทำอะไร | เวลาใน interview 45 นาที |
|---|---|---|
| 1. Requirements & scope | functional requirements, NFRs เป็นตัวเลข, constraints, สิ่งที่ ไม่ทำ | 5–10 นาที |
| 2. Estimate | QPS, storage, bandwidth (บทที่ 2 (Capacity Estimation)) | 5 นาที |
| 3. High-level design | APIs, data model, components หลัก, data flow | 10–15 นาที |
| 4. Deep dive & trade-offs | bottlenecks, failure modes, alternatives และเหตุผลที่เลือก | 15 นาที |
Step 4 สำคัญที่สุดและควรได้เวลามากที่สุด เพราะเป็นจุดที่แสดงว่าเข้าใจระบบจริง ไม่ใช่จำ diagram มา
Make NFRs measurable
NFRs (non-functional requirements) ที่เป็นคำคุณศัพท์ใช้ design ไม่ได้ ต้องแปลงเป็นตัวเลขเสมอ
| ลูกค้าพูดว่า | เขียนเป็น NFR |
|---|---|
| “ต้องเร็ว” | p99 latency < 300 ms ที่ 2,000 requests/s |
| “ห้ามล่ม” | availability 99.95% ต่อเดือน (downtime ≤ ~22 นาที) |
| “ข้อมูลห้ามหาย” | RPO = 0 สำหรับ ledger, RPO ≤ 5 นาทีสำหรับ analytics |
| “กู้ระบบได้เร็ว” | RTO ≤ 30 นาที |
| “รองรับคนเยอะ” | peak 20,000 QPS ช่วง flash sale 1 ชั่วโมง |
| “ปลอดภัย” | PDPA, encryption at rest และ in transit, MFA สำหรับ admin |
- RPO (recovery point objective): ยอม data loss ได้มากสุดเท่าไร นับเป็นเวลา
- RTO (recovery time objective): ยอม downtime หลังเกิด disaster ได้นานเท่าไร
- ใช้ percentiles (p95, p99) ไม่ใช่ average เพราะ average ซ่อน users ที่เจอระบบช้า
Questions for a discovery workshop
- Users & usage: ใครใช้, กี่คนต่อวัน, peak เมื่อไร (payday, 11.11, ปีใหม่)
- Data: ข้อมูลอะไร, ขนาดเท่าไร, เก็บกี่ปี, มี personal data ไหม
- Consistency: ตรงไหนที่ “ช้าไปนิดได้” ตรงไหนที่ “ผิดไม่ได้เลย” (เงิน, stock)
- Integration: ต้องต่อกับ core systems หรือ legacy อะไรบ้าง และ SLA ของมัน
- Constraints: cloud ที่องค์กรอนุญาต, regulation, data residency, งบ, deadline, skills ของทีม
- Success: วัดความสำเร็จด้วย metrics อะไร
Trade-offs and “when simpler is better”
ทุก design decision คือ trade-off เสมอ ให้เสนอเป็น options + recommendation ไม่ใช่คำตอบเดียว
| Option | Pros | Cons |
|---|---|---|
| Modular monolith | deploy ง่าย, transactions ง่าย, ทีมเล็กทำได้ | scale แยกส่วนไม่ได้ |
| Microservices | scale และ deploy แยกทีมได้ | distributed transactions, ops ซับซ้อน |
Recommendation: เริ่มจาก modular monolith ที่แบ่ง modules ตาม domain ชัด แล้วแยกเป็น service เมื่อมีเหตุผลจริง เช่น scale ต่างกันมาก หรือทีมชนกัน บันทึกเหตุผลเป็น ADR (ดูรูปแบบใน course AI Solution Architect บท Architecture Fundamentals & Decisions)