[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"academy-blogs-th-1-1-all-golang-websocket-latency-performance-optimization-guide-all--*":3,"academy-blog-translations-8puudn0kcj2zq78":79},{"data":4,"page":67,"perPage":67,"totalItems":67,"totalPages":67},[5],{"alt":6,"collectionId":7,"collectionName":8,"content":9,"cover_image":10,"cover_image_path":11,"created":12,"created_by":13,"expand":14,"id":73,"keywords":74,"locale":49,"published_at":75,"scheduled_at":13,"school_blog":71,"short_description":76,"slug":77,"status":69,"title":6,"updated":78,"updated_by":13,"views":72},"Golang The Series EP.138: Monitoring Latency & Performance – รีดความเร็ว WebSocket ให้ลื่นระดับเทพ","sclblg987654321","school_blog_translations","\u003Ch1>\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>รีดความเร็วระดับมิลลิวินาที ให้ระบบลื่นไหลไม่มีสะดุด\u003C\u002Fstrong>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fh1>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cp style=\"line-height:1.38;margin-bottom:12pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">ยินดีต้อนรับชาว Gopher ทุกท่านครับ! ในโลกของระบบ Real-time คำถามที่ว่า&nbsp;\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>\"Server รับคนได้กี่คน?\"\u003C\u002Fstrong>\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\"> นั้นเป็นเพียงแค่ปริมาณ แต่สิ่งที่ตัดสินว่าระบบของคุณ \"เจ๋ง\" จริงหรือไม่คือ&nbsp;\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>\"Latency\"\u003C\u002Fstrong>\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\"> หรือความหน่วงครับ\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003Cp style=\"line-height:1.38;margin-bottom:12pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">ลองจินตนาการว่าคุณกำลังเล่นแอปเทรดหุ้น หรือแอปแชทที่ส่งข้อความไปแล้วต้องรอ 1-2 วินาทีกว่าอีกฝ่ายจะเห็น นั่นไม่ใช่ประสบการณ์ WebSocket ที่ดีครับ วันนี้เราจะมาสวมวิญญาณนักปรับแต่ง (Tuner) เพื่อมองหา \"ความช้าที่มองไม่เห็น\" และกำจัดมันให้สิ้นซากครับ\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003Cp style=\"line-height:1.38;margin-bottom:12pt;margin-top:0pt;\" dir=\"ltr\">&nbsp;\u003C\u002Fp>\u003Ch2>\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>1. การวัด Latency: เลิกเชื่อค่า Average (เฉลี่ย) ได้แล้ว!\u003C\u002Fstrong>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fh2>\u003Cp style=\"line-height:1.38;margin-bottom:6pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">หนึ่งในความผิดพลาดที่ร้ายแรงที่สุดของ Developer คือการดูแค่&nbsp;\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Average Latency\u003C\u002Fstrong>\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\"> เพราะค่าเฉลี่ยจะกลบปัญหาที่เกิดขึ้นกับผู้ใช้บางกลุ่มไปจนหมด สิ่งที่เราต้องโฟกัสคือ&nbsp;\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Percentiles ($P_{95}, P_{99}$)\u003C\u002Fstrong>\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">:\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003Cul style=\"margin-bottom:0;margin-top:0;padding-inline-start:48px;\">\u003Cli style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;font-size:11pt;font-style:normal;font-variant:normal;font-weight:400;list-style-type:disc;text-decoration:none;vertical-align:baseline;white-space:pre;\" dir=\"ltr\" aria-level=\"1\">\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Average ($P_{50}$):\u003C\u002Fstrong>\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\"> ค่ากลางๆ ที่คนส่วนใหญ่เจอ\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fli>\u003Cli style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;font-size:11pt;font-style:normal;font-variant:normal;font-weight:400;list-style-type:disc;text-decoration:none;vertical-align:baseline;white-space:pre;\" dir=\"ltr\" aria-level=\"1\">\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>$P_{95}$:\u003C\u002Fstrong>\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\"> 95% ของผู้ใช้ได้รับข้อมูลภายในเวลานี้ (เริ่มเห็นปัญหา)\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fli>\u003Cli style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;font-size:11pt;font-style:normal;font-variant:normal;font-weight:400;list-style-type:disc;text-decoration:none;vertical-align:baseline;white-space:pre;\" dir=\"ltr\" aria-level=\"1\">\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>$P_{99}$:\u003C\u002Fstrong>\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\"> 1% ของผู้ใช้ที่โชคร้ายที่สุดเจอความช้าเท่าไหร่? (นี่คือ&nbsp;\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Tail Latency\u003C\u002Fstrong>\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\"> ที่มักเกิดจาก GC หรือ Network Congestion)\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fli>\u003C\u002Ful>\u003Cp>\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Superdev Tip:\u003C\u002Fstrong>\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\"> หาก $P_{50}$ ของคุณอยู่ที่ 20ms แต่ $P_{99}$ พุ่งไปที่ 2,000ms แสดงว่าระบบคุณมีอาการ \"สะอึก\" (Spike) ซึ่งมักเกิดจาก Stop-the-world ของ Garbage Collector หรือการติด Lock (Mutex) นานเกินไปครับ\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003Cp style=\"line-height:1.38;margin-bottom:0pt;margin-top:0pt;\" dir=\"ltr\">&nbsp;\u003C\u002Fp>\u003Ch2>\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>2. เจาะลึกจุดที่ทำให้เกิดความล่าช้า (The Bottlenecks)\u003C\u002Fstrong>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fh2>\u003Cp style=\"line-height:1.38;margin-bottom:6pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">Latency ใน WebSocket ไม่ได้มาจากโค้ด Go อย่างเดียว แต่มันคือผลรวมของ 3 ปัจจัย:\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003Col style=\"margin-bottom:0;margin-top:0;padding-inline-start:48px;\">\u003Cli style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;font-size:11pt;font-style:normal;font-variant:normal;font-weight:400;list-style-type:decimal;text-decoration:none;vertical-align:baseline;white-space:pre;\" dir=\"ltr\" aria-level=\"1\">\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Network Latency:\u003C\u002Fstrong>\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\"> ระยะทางทางกายภาพ (Speed of Light) แก้ได้ด้วยการขยับ Server ไปใกล้ User (Edge Computing\u002FAWS Global Accelerator)\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fli>\u003Cli style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;font-size:11pt;font-style:normal;font-variant:normal;font-weight:400;list-style-type:decimal;text-decoration:none;vertical-align:baseline;white-space:pre;\" dir=\"ltr\" aria-level=\"1\">\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>OS\u002FStack Latency:\u003C\u002Fstrong>\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\"> การจัดการ Context Switching ของ OS และ TCP Buffer ที่ไม่เหมาะสม\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fli>\u003Cli style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;font-size:11pt;font-style:normal;font-variant:normal;font-weight:400;list-style-type:decimal;text-decoration:none;vertical-align:baseline;white-space:pre;\" dir=\"ltr\" aria-level=\"1\">\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Application Latency:\u003C\u002Fstrong>\u003C\u002Fspan>\u003C\u002Fspan>\u003Cul style=\"margin-bottom:0;margin-top:0;padding-inline-start:48px;\">\u003Cli style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;font-size:11pt;font-style:normal;font-variant:normal;font-weight:400;list-style-type:circle;text-decoration:none;vertical-align:baseline;white-space:pre;\" dir=\"ltr\" aria-level=\"2\">\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Lock Contention:\u003C\u002Fstrong>\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\"> การใช้&nbsp;\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan style=\"background-color:#e9eef6;color:#444746;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">sync.Mutex\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\"> ในจุดที่มี Traffic หนาแน่นจน Goroutines ต้องเข้าแถวรอ\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fli>\u003Cli style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;font-size:11pt;font-style:normal;font-variant:normal;font-weight:400;list-style-type:circle;text-decoration:none;vertical-align:baseline;white-space:pre;\" dir=\"ltr\" aria-level=\"2\">\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Garbage Collection (GC):\u003C\u002Fstrong>\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\"> การจอง Memory พร่ำเพรื่อจน Go ต้องหยุดทำงานเพื่อกวาดขยะ\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fli>\u003C\u002Ful>\u003C\u002Fli>\u003C\u002Fol>\u003Cp style=\"line-height:1.38;margin-bottom:0pt;margin-top:0pt;\" dir=\"ltr\">&nbsp;\u003C\u002Fp>\u003Ch2>\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>3. กลยุทธ์การ Optimization ฉบับ Go Expert\u003C\u002Fstrong>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fh2>\u003Ch3>\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>A. ลดการจองหน่วยความจำด้วย&nbsp;\u003C\u002Fstrong>\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan style=\"background-color:#e9eef6;color:#444746;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>sync.Pool\u003C\u002Fstrong>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fh3>\u003Cp style=\"line-height:1.38;margin-bottom:12pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">การสร้าง Object (เช่น Buffer สำหรับอ่านข้อความ) ใหม่ทุกครั้งที่ส่งข้อความคือ \"ภาระ\" ของระบบครับ เราควรนำของเก่ามาใช้ใหม่ (Reuse)\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003Cp style=\"line-height:1.38;margin-bottom:12pt;margin-top:0pt;\" dir=\"ltr\">&nbsp;\u003C\u002Fp>\u003Cpre>\u003Ccode class=\"language-plaintext\">Go\nvar bufferPool = sync.Pool{\n&nbsp;&nbsp;&nbsp;&nbsp;New:&nbsp;func()&nbsp;any {\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\u002F\u002F จอง Buffer ขนาด 4KB เตรียมไว้\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;make([]byte,&nbsp;4096)\n&nbsp;&nbsp;&nbsp;&nbsp;},\n}\n\nfunc&nbsp;handleMessage(conn *websocket.Conn) {\n&nbsp;&nbsp;&nbsp;&nbsp;buf := bufferPool.Get().([]byte)\n&nbsp;&nbsp;&nbsp;&nbsp;defer bufferPool.Put(buf)&nbsp;\u002F\u002F คืนเข้า Pool เมื่อใช้เสร็จ\n\n&nbsp;&nbsp;&nbsp;&nbsp;_, message, _ := conn.ReadMessage()\n&nbsp;&nbsp;&nbsp;&nbsp;copy(buf, message)\n&nbsp;&nbsp;&nbsp;&nbsp;\u002F\u002F ประมวลผลต่อโดยไม่สร้างภาระให้ GC\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>&nbsp;\u003C\u002Fp>\u003Ch3>\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>B. ปรับแต่ง TCP Stack (TCP_NODELAY)\u003C\u002Fstrong>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fh3>\u003Cp style=\"line-height:1.38;margin-bottom:6pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">โดยปกติ TCP จะใช้&nbsp;\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Nagle's Algorithm\u003C\u002Fstrong>\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\"> เพื่อรอรวมข้อมูลชิ้นเล็กๆ เป็นก้อนใหญ่ก่อนส่ง (เพื่อประหยัด Bandwidth) แต่สำหรับ WebSocket มันคือ \"ยาพิษ\" เพราะทำให้ข้อมูลดีเลย์\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003Cul style=\"margin-bottom:0;margin-top:0;padding-inline-start:48px;\">\u003Cli style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;font-size:11pt;font-style:normal;font-variant:normal;font-weight:400;list-style-type:disc;text-decoration:none;vertical-align:baseline;white-space:pre;\" dir=\"ltr\" aria-level=\"1\">\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Solution:\u003C\u002Fstrong>\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\"> ตรวจสอบว่า Library ของคุณเปิด&nbsp;\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan style=\"background-color:#e9eef6;color:#444746;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">SetNoDelay(true)\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\"> หรือยัง (ใน Go&nbsp;\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan style=\"background-color:#e9eef6;color:#444746;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">net\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\"> package จะเปิดให้เป็น Default อยู่แล้ว แต่ถ้าผ่าน Proxy\u002FLoad Balancer ต้องเช็คจุดนั้นด้วยครับ)\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fli>\u003C\u002Ful>\u003Ch3>\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>C. ย้ายจาก JSON ไปเป็น Binary (Protobuf)\u003C\u002Fstrong>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fh3>\u003Cp style=\"line-height:1.38;margin-bottom:12pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">JSON กิน CPU ในการ Serialize\u002FDeserialize สูงมาก และมีขนาดใหญ่ (Verbose) การเปลี่ยนมาใช้&nbsp;\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Protocol Buffers (Protobuf)\u003C\u002Fstrong>\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\"> จะช่วยลดขนาด Packet ลงได้ 30-70% ซึ่งหมายถึง Latency ที่ลดลงในระดับ Network ด้วยครับ\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003Cp style=\"line-height:1.38;margin-bottom:0pt;margin-top:0pt;\" dir=\"ltr\">&nbsp;\u003C\u002Fp>\u003Ch2>\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>4. Monitoring แบบ End-to-End ด้วย Tracing\u003C\u002Fstrong>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fh2>\u003Cp style=\"line-height:1.38;margin-bottom:12pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">ถ้า Server บอกว่าประมวลผลเสร็จใน 5ms แต่ User บ่นว่าช้า? ปัญหาระหว่างทางคือสิ่งที่คุณต้องพิสูจน์ครับ\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003Cp style=\"line-height:1.38;margin-bottom:6pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">เราใช้&nbsp;\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>OpenTelemetry (OTel)\u003C\u002Fstrong>\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\"> ในการฉีด&nbsp;\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan style=\"background-color:#e9eef6;color:#444746;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">Trace ID\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\"> เข้าไปใน WebSocket Handshake:\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003Cul style=\"margin-bottom:0;margin-top:0;padding-inline-start:48px;\">\u003Cli style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;font-size:11pt;font-style:normal;font-variant:normal;font-weight:400;list-style-type:disc;text-decoration:none;vertical-align:baseline;white-space:pre;\" dir=\"ltr\" aria-level=\"1\">\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">คุณจะเห็นทันทีว่าข้อมูลค้างอยู่ที่ Load Balancer นานเท่าไหร่\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fli>\u003Cli style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;font-size:11pt;font-style:normal;font-variant:normal;font-weight:400;list-style-type:disc;text-decoration:none;vertical-align:baseline;white-space:pre;\" dir=\"ltr\" aria-level=\"1\">\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">ค้างอยู่ที่ Redis (Pub\u002FSub) นานเท่าไหร่\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fli>\u003Cli style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;font-size:11pt;font-style:normal;font-variant:normal;font-weight:400;list-style-type:disc;text-decoration:none;vertical-align:baseline;white-space:pre;\" dir=\"ltr\" aria-level=\"1\">\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">และออกไปถึงหน้าจอ User เมื่อไหร่\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fli>\u003C\u002Ful>\u003Cp>\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">การเห็นภาพแบบ Timeline จะทำให้คุณเลิก \"เดา\" แล้วเริ่ม \"แก้\" ได้ถูกจุดครับ\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003Cp style=\"line-height:1.38;margin-bottom:0pt;margin-top:0pt;\" dir=\"ltr\">&nbsp;\u003C\u002Fp>\u003Ch2>\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>5. การจูน Write Buffer และ Flush Strategy\u003C\u002Fstrong>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fh2>\u003Cp style=\"line-height:1.38;margin-bottom:6pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">ในระบบที่มีการส่งข้อความถี่มาก (เช่น กราฟหุ้น) การส่งออกไปทีละข้อความ (Write) จะทำให้เกิด&nbsp;\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>System Call\u003C\u002Fstrong>\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\"> บ่อยจน CPU Peak\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003Cul style=\"margin-bottom:0;margin-top:0;padding-inline-start:48px;\">\u003Cli style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;font-size:11pt;font-style:normal;font-variant:normal;font-weight:400;list-style-type:disc;text-decoration:none;vertical-align:baseline;white-space:pre;\" dir=\"ltr\" aria-level=\"1\">\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Tuning:\u003C\u002Fstrong>\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\"> ใช้การทำ&nbsp;\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Write Coalescing\u003C\u002Fstrong>\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\"> (รวมข้อความสั้นๆ ในช่วงเวลาไม่กี่มิลลิวินาทีแล้วส่งออกไปทีเดียว) เพื่อลดจำนวน System Call โดยไม่กระทบต่อความรู้สึก Real-time ของผู้ใช้\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fli>\u003C\u002Ful>\u003Cp>&nbsp;\u003C\u002Fp>\u003Chr>\u003Cp>&nbsp;\u003C\u002Fp>\u003Ch2>\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>สรุป\u003C\u002Fstrong>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fh2>\u003Cp style=\"line-height:1.38;margin-bottom:12pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Monitoring &amp; Performance Optimization\u003C\u002Fstrong>\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\"> ไม่ใช่การตั้งค่าครั้งเดียวแล้วจบ แต่เป็นงานฝีมือที่ต้องอาศัยข้อมูล (\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Data-driven\u003C\u002Fstrong>\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">) การทำให้ระบบเร็วขึ้น 100ms อาจดูเหมือนน้อยในเชิงตัวเลข แต่มันคือความต่างระหว่าง \"แอปที่ให้ความรู้สึกติดขัด\" กับ \"แอปที่ลื่นไหลระดับเทพ\" ครับ\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003Cp style=\"line-height:1.38;margin-bottom:12pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#1f1f1f;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>ในตอนหน้า (EP.139):\u003C\u002Fstrong>\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\"> เราจะขยับไปดูเคสที่ท้าทายที่สุดคือ&nbsp;\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Best Practices สำหรับ Mobile &amp; Low-bandwidth Environment\u003C\u002Fstrong>\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\"> — เมื่อเน็ตมือถือของ User ไม่เป็นใจ (3G\u002F4G หรือเน็ตแกว่ง) เราจะทำอย่างไรให้ WebSocket ยังทำงานได้เสถียร! ห้ามพลาดครับ\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003Cp style=\"line-height:1.38;margin-bottom:0pt;margin-top:0pt;\" dir=\"ltr\">&nbsp;\u003C\u002Fp>\u003Cdiv class=\"raw-html-embed\">\u003Cdiv style=\"margin:0 0 6px 0; font-weight:700;\">อ่านบทความ Series อื่นๆ:\u003C\u002Fdiv>\n\u003Cul style=\"list-style:none; padding:0; margin:0; line-height:1.4;\">\n  \u003Cli style=\"margin:0;\">\u003Ca href=\"\u002Fblogs\u002Fcategories\u002FGolang\" title=\"Golang The Series\">Golang The Series\u003C\u002Fa>\u003C\u002Fli>\n  \u003Cli style=\"margin:0;\">\u003Ca href=\"\u002Fblogs\u002Fcategories\u002FJS2GO\" title=\"JS2GO\">JS2GO\u003C\u002Fa>\u003C\u002Fli>\n  \u003Cli style=\"margin:0;\">\u003Ca href=\"\u002Fblogs\u002Fcategories\u002FTailwind%20CSS\" title=\"10 Ep ที่จะให้คุณเป็นมือโปร Tailwind CSS ในชั่วข้ามคืน\">10 Ep ที่จะให้คุณเป็นมือโปร Tailwind CSS ในชั่วข้ามคืน\u003C\u002Fa>\u003C\u002Fli>\n\u003C\u002Ful>\u003C\u002Fdiv>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cdiv class=\"raw-html-embed\">\n  \u003Cp style=\"margin:0 0 6px 0;\">\u003Cstrong>Follow Us:\u003C\u002Fstrong>\u003C\u002Fp>\n  \u003Cul style=\"list-style:none; padding:0; margin:0; line-height: 0.4;\">\n    \u003Cli style=\"display:flex; align-items:center; gap:6px; margin:0;\">\n      \n      \u003Csvg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"#1877F2\" aria-hidden=\"true\">\n        \u003Cpath d=\"M22 12.07C22 6.48 17.52 2 11.93 2S2 6.48 2 12.07c0 5 3.66 9.14 8.44 9.93v-7.02H7.9v-2.91h2.54V9.41c0-2.5 1.49-3.88 3.77-3.88 1.09 0 2.24.2 2.24.2v2.46h-1.26c-1.24 0-1.63.77-1.63 1.56v1.87h2.78l-.44 2.91h-2.34V22c4.78-.79 8.44-4.93 8.44-9.93Z\">\u003C\u002Fpath>\n      \u003C\u002Fsvg>\n      \u003Ca href=\"https:\u002F\u002Fwww.facebook.com\u002Fsuperdev.academy.th\" target=\"_blank\" rel=\"nofollow noopener\" title=\"Follow Superdev Academy on Facebook\">Facebook: Superdev Academy\u003C\u002Fa>\n    \u003C\u002Fli>\n\n    \u003Cli style=\"display:flex; align-items:center; gap:6px; margin:0;\">\n      \n      \u003Csvg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"#FF0000\" aria-hidden=\"true\">\n        \u003Cpath d=\"M23.5 6.2a3 3 0 0 0-2.1-2.1C19.5 3.5 12 3.5 12 3.5s-7.5 0-9.4.6A3 3 0 0 0 .5 6.2 31.5 31.5 0 0 0 0 12a31.5 31.5 0 0 0 .5 5.8 3 3 0 0 0 2.1 2.1c1.9.6 9.4.6 9.4.6s7.5 0 9.4-.6a3 3 0 0 0 2.1-2.1A31.5 31.5 0 0 0 24 12a31.5 31.5 0 0 0-.5-5.8ZM9.75 15.02V8.98L15.5 12l-5.75 3.02Z\">\u003C\u002Fpath>\n      \u003C\u002Fsvg>\n      \u003Ca href=\"https:\u002F\u002Fwww.youtube.com\u002F@SuperdevAcademy\" target=\"_blank\" rel=\"nofollow noopener\" title=\"Watch on YouTube\">YouTube: Superdev Academy\u003C\u002Fa>\n    \u003C\u002Fli>\n\n    \u003Cli style=\"display:flex; align-items:center; gap:6px; margin:0;\">\n      \n      \u003Csvg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"#E4405F\" aria-hidden=\"true\">\n        \u003Cpath d=\"M7 2h10a5 5 0 0 1 5 5v10a5 5 0 0 1-5 5H7a5 5 0 0 1-5-5V7a5 5 0 0 1 5-5Zm10 2H7a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3Zm-5 3.5A5.5 5.5 0 1 1 6.5 13 5.5 5.5 0 0 1 12 7.5Zm0 2A3.5 3.5 0 1 0 15.5 13 3.5 3.5 0 0 0 12 9.5Zm5.75-2.75a1.25 1.25 0 1 1-1.25 1.25 1.25 1.25 0 0 1 1.25-1.25Z\">\u003C\u002Fpath>\n      \u003C\u002Fsvg>\n      \u003Ca href=\"https:\u002F\u002Fwww.instagram.com\u002Fsuperdevacademy\u002F?hl=en target=\" _blank\"=\"\" rel=\"nofollow noopener\" title=\"See behind-the-scenes on Instagram\">Instagram: Superdev Academy\u003C\u002Fa>\n    \u003C\u002Fli>\n\n    \u003Cli style=\"display:flex; align-items:center; gap:6px; margin:0;\">\n      \n      \u003Csvg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"#000000\" aria-hidden=\"true\">\n        \u003Cpath d=\"M21 8.12a6.86 6.86 0 0 1-4.8-2V16a6 6 0 1 1-6-6 5.9 5.9 0 0 1 1.63.23V8.05a9.08 9.08 0 0 1-1.63-.15V4.5a6.86 6.86 0 0 0 4.8 2.05V6.5a6.86 6.86 0 0 0 4.8 1.62ZM9.2 12.5A3.5 3.5 0 1 0 12.7 16V9.94a6 6 0 0 1-1.63-.27v3.95a3.5 3.5 0 0 1-1.87 3.17 3.5 3.5 0 0 1-4.78-3.23 3.5 3.5 0 0 1 4.78-3.06Z\">\u003C\u002Fpath>\n      \u003C\u002Fsvg>\n      \u003Ca href=\"https:\u002F\u002Fwww.tiktok.com\u002F@superdevacademy\" target=\"_blank\" rel=\"nofollow noopener\" title=\"Watch short tips on TikTok\">TikTok: @superdevacademy\u003C\u002Fa>\n    \u003C\u002Fli>\n\n    \u003Cli style=\"display:flex; align-items:center; gap:6px; margin:0;\">\n      \n      \u003Csvg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"#111827\" aria-hidden=\"true\">\n        \u003Cpath d=\"M12 2a10 10 0 1 0 10 10A10.01 10.01 0 0 0 12 2Zm6.93 6h-3.26a15.6 15.6 0 0 0-1.39-3.62A8.03 8.03 0 0 1 18.93 8ZM12 4c.73.93 1.7 2.74 2.2 4H9.8C10.3 6.74 11.27 4.93 12 4ZM8.72 4.38A15.6 15.6 0 0 0 7.32 8H4.07a8.03 8.03 0 0 1 4.65-3.62ZM4.07 16h3.25a15.6 15.6 0 0 0 1.4 3.62A8.03 8.03 0 0 1 4.07 16ZM12 20c-.73-.93-1.7-2.74-2.2-4h4.4C13.7 17.26 12.73 19.07 12 20Zm3.28-.38A15.6 15.6 0 0 0 16.68 16h3.25a8.03 8.03 0 0 1-4.65 3.62ZM20 14h-3.54a13.8 13.8 0 0 1-.26-4H20a7.98 7.98 0 0 1 0 4Zm-12.2 0H4a7.98 7.98 0 0 1 0-4h3.54a13.8 13.8 0 0 1-.26 4Zm2 .5h4.4a17.8 17.8 0 0 1-.72-4.5c0-1.58.25-3.1.72-4.5H9.8a17.8 17.8 0 0 1 .72 4.5c0 1.58-.25 3.1-.72 4.5Z\">\u003C\u002Fpath>\n      \u003C\u002Fsvg>\n      \u003Ca href=\"https:\u002F\u002Fwww.superdevacademy.com\u002F\" target=\"_blank\" rel=\"noopener\" title=\"Visit the official website of Superdev Academy\">Official Website: Superdev Academy.com\u003C\u002Fa>\n    \u003C\u002Fli>\n  \u003C\u002Ful>\n\u003C\u002Fdiv>","golang_the_series_ep_tk994uyv8n.nceOptimization.webp","https:\u002F\u002Ftwsme-r2.tumwebsme.com\u002Fsclblg987654321\u002Fkonpz3tbe4ya0tx\u002Fgolang_the_series_ep_tk994uyv8n.nceOptimization.webp","2026-03-04 08:44:12.584Z","",{"keywords":15,"locale":43,"school_blog":53},[16,23,28,33,38],{"collectionId":17,"collectionName":18,"created":19,"created_by":13,"id":20,"name":21,"updated":22,"updated_by":13},"sclkey987654321","school_keywords","2026-03-04 08:44:11.146Z","gms2qr4xg6qv65e","Superdev Academy","2026-04-10 16:12:41.207Z",{"collectionId":17,"collectionName":18,"created":24,"created_by":13,"id":25,"name":26,"updated":27,"updated_by":13},"2026-03-04 08:44:11.932Z","8sanh9jytfatsgk","Performance Optimization","2026-04-10 16:12:41.404Z",{"collectionId":17,"collectionName":18,"created":29,"created_by":13,"id":30,"name":31,"updated":32,"updated_by":13},"2026-03-04 08:44:11.548Z","ezm3p0vsuowuadd","Latency","2026-04-10 16:12:41.299Z",{"collectionId":17,"collectionName":18,"created":34,"created_by":13,"id":35,"name":36,"updated":37,"updated_by":13},"2026-03-04 08:34:00.920Z","ecac9y661or1xka","WebSocket","2026-04-10 16:08:05.227Z",{"collectionId":17,"collectionName":18,"created":39,"created_by":13,"id":40,"name":41,"updated":42,"updated_by":13},"2026-03-04 08:20:14.253Z","ah6lvy4x8qe08l5","Golang","2026-04-10 16:07:26.172Z",{"code":44,"collectionId":45,"collectionName":46,"created":47,"flag":48,"id":49,"is_default":50,"label":51,"updated":52},"th","pbc_1989393366","locales","2026-01-22 10:59:55.832Z","twemoji:flag-thailand","s8wri3bt4vgg2ji",true,"Thai","2026-04-10 15:42:46.614Z",{"category":54,"collectionId":55,"collectionName":56,"expand":57,"id":71,"views":72},"wqxt7ag2gn7xcmk","pbc_2105096300","school_blogs",{"category":58},{"blogIds":59,"collectionId":60,"collectionName":61,"created":62,"created_by":13,"id":54,"image":63,"image_alt":13,"image_path":64,"label":65,"name":66,"priority":67,"publish_at":68,"scheduled_at":13,"status":69,"updated":70,"updated_by":13},[],"sclcatblg987654321","school_category_blogs","2026-03-04 08:33:53.210Z","59ty92ns80w_15oc1implw.png","https:\u002F\u002Ftwsme-r2.tumwebsme.com\u002Fsclcatblg987654321\u002Fwqxt7ag2gn7xcmk\u002F59ty92ns80w_15oc1implw.png",{"en":66,"th":66},"Golang The Series",1,"2026-03-16 04:39:38.440Z","published","2026-04-25 02:32:15.470Z","8puudn0kcj2zq78",239,"konpz3tbe4ya0tx",[20,25,30,35,40],"2026-03-02 04:30:22.021Z","เลิกดูแค่ค่าเฉลี่ย! เจาะลึกวิธีวัด Latency แบบ P95\u002FP99 และเทคนิครีดประสิทธิภาพ Go WebSocket ให้ถึงขีดสุดด้วย sync.Pool, Protobuf และการจูน TCP Stack เพื่อประสบการณ์ผู้ใช้ที่ไม่มีสะดุด","golang-websocket-latency-performance-optimization-guide","2026-04-25 02:47:39.346Z",{"th":77}]