[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"academy-blogs-en-1-1-all-go-websocket-k6-load-testing-performance-tuning-all--*":3,"academy-blog-translations-xpb7i33hs27leyi":80},{"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":75,"keywords":76,"locale":49,"published_at":77,"scheduled_at":13,"school_blog":71,"short_description":78,"status":69,"title":6,"updated":79,"updated_by":13,"slug":72,"views":74},"Golang The Series EP 134: Load & Stress Testing WebSockets with k6","sclblg987654321","school_blog_translations","\u003Cp style=\"line-height:1.38;margin-bottom:12pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#000000;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;\">Welcome back, Gophers! Many developers confidently claim, \"My code is well-written; it will scale effortlessly.\" However, in production, WebSocket servers often reveal strange behaviors under heavy traffic—\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Memory Leaks\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>File Descriptor exhaustion\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;\">, or&nbsp;\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Goroutine stalemates\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;\"> that can bring your entire system to a halt.\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003Cp style=\"line-height:1.38;margin-bottom:12pt;margin-top:0pt;\" dir=\"ltr\">&nbsp;\u003C\u002Fp>\u003Cp style=\"line-height:1.38;margin-bottom:12pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#000000;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;\">Today, we step into the role of the \"Destroyer\" to prove whether the systems we’ve built since EP 1 are truly resilient or if they will crumble under the weight of a traffic storm.\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:#000000;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. Load, Stress, and Soak Testing: What’s the Difference?\u003C\u002Fstrong>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fh2>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cp style=\"line-height:1.38;margin-bottom:12pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#000000;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;\">Before we start \"attacking\" our system, we must define our objectives clearly:\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003Cp style=\"line-height:1.38;margin-bottom:12pt;margin-top:0pt;\" dir=\"ltr\">&nbsp;\u003C\u002Fp>\u003Cdiv style=\"margin-left:0pt;\" dir=\"ltr\" align=\"left\">\u003Cfigure class=\"table\" style=\"width:82.24%;\">\u003Ctable class=\"ck-table-resized\" style=\"border-collapse:collapse;border-style:none;\">\u003Ccolgroup>\u003Ccol style=\"width:21.82%;\" width=\"96\">\u003Ccol style=\"width:40.51%;\" width=\"224\">\u003Ccol style=\"width:37.67%;\" width=\"304\">\u003C\u002Fcolgroup>\u003Ctbody>\u003Ctr style=\"height:26.5pt;\">\u003Ctd style=\"border-color:#000000;border-width:0.75pt;overflow-wrap:break-word;overflow:hidden;padding:5pt;vertical-align:top;\">\u003Cp style=\"line-height:1.38;margin-bottom:24pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#000000;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Test Type\u003C\u002Fstrong>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003C\u002Ftd>\u003Ctd style=\"border-color:#000000;border-width:0.75pt;overflow-wrap:break-word;overflow:hidden;padding:5pt;vertical-align:top;\">\u003Cp style=\"line-height:1.38;margin-bottom:24pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#000000;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Definition\u003C\u002Fstrong>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003C\u002Ftd>\u003Ctd style=\"border-color:#000000;border-width:0.75pt;overflow-wrap:break-word;overflow:hidden;padding:5pt;vertical-align:top;\">\u003Cp style=\"line-height:1.38;margin-bottom:24pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#000000;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Objective\u003C\u002Fstrong>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr style=\"height:40.75pt;\">\u003Ctd style=\"border-color:#000000;border-width:0.75pt;overflow-wrap:break-word;overflow:hidden;padding:5pt;vertical-align:top;\">\u003Cp style=\"line-height:1.38;margin-bottom:24pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#000000;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Load Testing\u003C\u002Fstrong>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003C\u002Ftd>\u003Ctd style=\"border-color:#000000;border-width:0.75pt;overflow-wrap:break-word;overflow:hidden;padding:5pt;vertical-align:top;\">\u003Cp style=\"line-height:1.38;margin-bottom:24pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#000000;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;\">Testing under expected traffic targets.\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003C\u002Ftd>\u003Ctd style=\"border-color:#000000;border-width:0.75pt;overflow-wrap:break-word;overflow:hidden;padding:5pt;vertical-align:top;\">\u003Cp style=\"line-height:1.38;margin-bottom:24pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#000000;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;\">Does the system meet the SLA (Latency\u002FThroughput)?\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr style=\"height:40.75pt;\">\u003Ctd style=\"border-color:#000000;border-width:0.75pt;overflow-wrap:break-word;overflow:hidden;padding:5pt;vertical-align:top;\">\u003Cp style=\"line-height:1.38;margin-bottom:24pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#000000;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Stress Testing\u003C\u002Fstrong>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003C\u002Ftd>\u003Ctd style=\"border-color:#000000;border-width:0.75pt;overflow-wrap:break-word;overflow:hidden;padding:5pt;vertical-align:top;\">\u003Cp style=\"line-height:1.38;margin-bottom:24pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#000000;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;\">Pushing the system until it breaks.\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003C\u002Ftd>\u003Ctd style=\"border-color:#000000;border-width:0.75pt;overflow-wrap:break-word;overflow:hidden;padding:5pt;vertical-align:top;\">\u003Cp style=\"line-height:1.38;margin-bottom:24pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#000000;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;\">Where is the&nbsp;\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Breaking Point\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;\">? Which component fails first?\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr style=\"height:40.75pt;\">\u003Ctd style=\"border-color:#000000;border-width:0.75pt;overflow-wrap:break-word;overflow:hidden;padding:5pt;vertical-align:top;\">\u003Cp style=\"line-height:1.38;margin-bottom:24pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#000000;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Soak Testing\u003C\u002Fstrong>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003C\u002Ftd>\u003Ctd style=\"border-color:#000000;border-width:0.75pt;overflow-wrap:break-word;overflow:hidden;padding:5pt;vertical-align:top;\">\u003Cp style=\"line-height:1.38;margin-bottom:24pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#000000;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;\">Running a steady load for a long duration (e.g., 24h).\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003C\u002Ftd>\u003Ctd style=\"border-color:#000000;border-width:0.75pt;overflow-wrap:break-word;overflow:hidden;padding:5pt;vertical-align:top;\">\u003Cp style=\"line-height:1.38;margin-bottom:24pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#000000;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;\">Are there long-term&nbsp;\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Memory Leaks\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;\"> or resource accumulation?\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Ffigure>\u003C\u002Fdiv>\u003Cp style=\"line-height:1.38;margin-bottom:0pt;margin-top:0pt;\" dir=\"ltr\">&nbsp;\u003C\u002Fp>\u003Ch2>\u003Cspan style=\"background-color:transparent;color:#000000;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. Instrumenting Your Go Server for Testing\u003C\u002Fstrong>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fh2>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cp style=\"line-height:1.38;margin-bottom:12pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#000000;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;\">To effectively test, we must be able to \"see\" the internal state of the server while it is under fire. We use the&nbsp;\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan style=\"background-color:transparent;color:#188038;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;\">runtime\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan style=\"background-color:transparent;color:#000000;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 and&nbsp;\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan style=\"background-color:transparent;color:#188038;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;\">prometheus\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan style=\"background-color:transparent;color:#000000;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;\"> to track health metrics.\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003Cp style=\"line-height:1.38;margin-bottom:12pt;margin-top:0pt;\" dir=\"ltr\">&nbsp;\u003C\u002Fp>\u003Ch3>\u003Cspan style=\"background-color:transparent;color:#000000;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Go Code: Instrumentation &amp; Resource Awareness\u003C\u002Fstrong>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fh3>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cpre>\u003Ccode class=\"language-plaintext\">Go\npackage main\n\nimport (\n\t\"log\"\n\t\"net\u002Fhttp\"\n\t\"runtime\"\n\t\"syscall\"\n\n\t\"github.com\u002Fprometheus\u002Fclient_golang\u002Fprometheus\"\n\t\"github.com\u002Fprometheus\u002Fclient_golang\u002Fprometheus\u002Fpromauto\"\n\t\"github.com\u002Fprometheus\u002Fclient_golang\u002Fprometheus\u002Fpromhttp\"\n)\n\nvar (\n\t\u002F\u002F Track the actual number of running Goroutines\n\tgoroutineGauge = promauto.NewGauge(prometheus.GaugeOpts{\n\t\tName: \"current_goroutines_count\",\n\t\tHelp: \"The total number of currently active goroutines\",\n\t})\n)\n\nfunc main() {\n\t\u002F\u002F 1. Check System Limits (File Descriptors)\n\tvar rLimit syscall.Rlimit\n\tif err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &amp;rLimit); err == nil {\n\t\tlog.Printf(\"System-level File Descriptor Limit: %d\", rLimit.Cur)\n\t}\n\n\t\u002F\u002F 2. Expose Metrics for Prometheus\u002FGrafana (Port 2112)\n\tgo func() {\n\t\thttp.Handle(\"\u002Fmetrics\", promhttp.Handler())\n\t\tlog.Println(\"Metrics endpoint available on :2112\u002Fmetrics\")\n\t\thttp.ListenAndServe(\":2112\", nil)\n\t}()\n\n\t\u002F\u002F 3. Monitor Goroutine count in the background\n\tgo func() {\n\t\tfor {\n\t\t\tgoroutineGauge.Set(float64(runtime.NumGoroutine()))\n\t\t}\n\t}()\n\n\t\u002F\u002F Your WebSocket Server Logic goes here...\n}\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>&nbsp;\u003C\u002Fp>\u003Ch2>\u003Cspan style=\"background-color:transparent;color:#000000;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. Designing the Attack: Scripting with k6\u003C\u002Fstrong>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fh2>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cp style=\"line-height:1.38;margin-bottom:12pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#000000;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;\">For WebSocket testing, we recommend&nbsp;\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>k6\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;\"> (by Grafana). It uses a Go-powered engine but allows you to script scenarios in JavaScript, making it incredibly flexible.\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003Cp style=\"line-height:1.38;margin-bottom:12pt;margin-top:0pt;\" dir=\"ltr\">&nbsp;\u003C\u002Fp>\u003Ch3>\u003Cspan style=\"background-color:transparent;color:#000000;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>k6 Script Example (JavaScript):\u003C\u002Fstrong>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fh3>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cpre>\u003Ccode class=\"language-plaintext\">JavaScript\nimport ws from 'k6\u002Fws';\nimport { check, sleep } from 'k6';\n\nexport const options = {\n&nbsp;&nbsp;stages: [\n&nbsp;&nbsp;&nbsp;&nbsp;{ duration: '1m', target: 5000 },&nbsp; \u002F\u002F Ramping up: 0 to 5,000 users in 1 min\n&nbsp;&nbsp;&nbsp;&nbsp;{ duration: '3m', target: 5000 },&nbsp; \u002F\u002F Sustained: Hold at 5,000 users\n&nbsp;&nbsp;&nbsp;&nbsp;{ duration: '1m', target: 0 }, &nbsp; &nbsp; \u002F\u002F Ramping down: Gradually release\n&nbsp;&nbsp;],\n};\n\nexport default function () {\n&nbsp;&nbsp;const url = 'ws:\u002F\u002Flocalhost:8080\u002Fws';\n&nbsp;&nbsp;\n&nbsp;&nbsp;const res = ws.connect(url, null, function (socket) {\n&nbsp;&nbsp;&nbsp;&nbsp;socket.on('open', () =&gt; {\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\u002F\u002F Simulate sending a heartbeat or chat every 10 seconds\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;socket.setInterval(() =&gt; {\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;socket.send(JSON.stringify({ type: 'ping', payload: 'Gopher-Check' }));\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, 10000);\n&nbsp;&nbsp;&nbsp;&nbsp;});\n\n&nbsp;&nbsp;&nbsp;&nbsp;socket.on('message', (data) =&gt; {\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\u002F\u002F Verify that the server responds correctly\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;check(data, { 'message received': (d) =&gt; d.length &gt; 0 });\n&nbsp;&nbsp;&nbsp;&nbsp;});\n\n&nbsp;&nbsp;&nbsp;&nbsp;\u002F\u002F Simulate user session duration (Stay for 60 seconds)\n&nbsp;&nbsp;&nbsp;&nbsp;socket.setTimeout(() =&gt; {\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;socket.close();\n&nbsp;&nbsp;&nbsp;&nbsp;}, 60000);\n&nbsp;&nbsp;});\n\n&nbsp;&nbsp;check(res, { 'status is 101 (Switching Protocols)': (r) =&gt; r &amp;&amp; r.status === 101 });\n}\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>&nbsp;\u003C\u002Fp>\u003Ch2>\u003Cspan style=\"background-color:transparent;color:#000000;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. Key Metrics to Watch\u003C\u002Fstrong>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fh2>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cp style=\"line-height:1.38;margin-bottom:12pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#000000;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;\">While k6 is bombarding your system, keep your eyes on your Prometheus Dashboard:\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003Col style=\"margin-bottom:0;margin-top:0;padding-inline-start:48px;\">\u003Cli style=\"background-color:transparent;color:#000000;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:#000000;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Goroutine Count:\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;\"> If users disconnect but the Goroutine count stays high, you have a&nbsp;\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Goroutine Leak\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;\"> (usually caused by unclosed channels or infinite loops).\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fli>\u003Cli style=\"background-color:transparent;color:#000000;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:#000000;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>RSS (Resident Set Size):\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;\"> If memory usage keeps climbing and never settles, you have a&nbsp;\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Memory Leak\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:#000000;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:#000000;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Handshake Error Rate:\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;\"> High error rates during the 101 Switching Protocols phase indicate that your Load Balancer or Handshake logic is overwhelmed.\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fli>\u003Cli style=\"background-color:transparent;color:#000000;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:#000000;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>File Descriptors:\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;\"> Monitor&nbsp;\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan style=\"background-color:transparent;color:#188038;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;\">process_open_fds\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan style=\"background-color:transparent;color:#000000;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;\">. If it hits the OS limit (\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan style=\"background-color:transparent;color:#188038;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;\">ulimit\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan style=\"background-color:transparent;color:#000000;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;\">), new connections will be rejected immediately.\u003C\u002Fspan>\u003C\u002Fspan>\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:#000000;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. Tuning Your System for High Concurrency\u003C\u002Fstrong>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fh2>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cp style=\"line-height:1.38;margin-bottom:12pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#000000;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;\">If your system breaks at 5,000 connections and you need to reach 100,000:\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003Cul style=\"margin-bottom:0;margin-top:0;padding-inline-start:48px;\">\u003Cli style=\"background-color:transparent;color:#000000;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:#000000;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Adjust&nbsp;\u003C\u002Fstrong>\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan style=\"background-color:transparent;color:#188038;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>ulimit\u003C\u002Fstrong>\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan style=\"background-color:transparent;color:#000000;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>\u003Cspan style=\"font-style:normal;font-variant:normal;font-weight:400;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\"> In Linux, 1 WebSocket = 1 File. If your limit is set to 1,024, the 1,025th user will fail. Increase it to 100,000+ in&nbsp;\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan style=\"background-color:transparent;color:#188038;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;\">\u002Fetc\u002Fsecurity\u002Flimits.conf\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan style=\"background-color:transparent;color:#000000;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;\">.\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fli>\u003Cli style=\"background-color:transparent;color:#000000;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:#000000;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Buffer Management:\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;\"> Ensure you are using&nbsp;\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan style=\"background-color:transparent;color:#188038;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.Pool\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan style=\"background-color:transparent;color:#000000;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;\"> (from&nbsp;\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>EP 132\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;\">) to reuse memory buffers during message processing to reduce GC pressure.\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fli>\u003Cli style=\"background-color:transparent;color:#000000;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:#000000;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>TCP 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;\"> Adjust&nbsp;\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan style=\"background-color:transparent;color:#188038;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_fin_timeout\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan style=\"background-color:transparent;color:#000000;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;\"> and&nbsp;\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan style=\"background-color:transparent;color:#188038;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_tw_reuse\u003C\u002Fspan>\u003C\u002Fspan>\u003Cspan style=\"background-color:transparent;color:#000000;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;\"> at the OS level to recycle sockets faster.\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fli>\u003C\u002Ful>\u003Cp>&nbsp;\u003C\u002Fp>\u003Chr>\u003Cp>&nbsp;\u003C\u002Fp>\u003Ch2>\u003Cspan style=\"background-color:transparent;color:#000000;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Summary\u003C\u002Fstrong>\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fh2>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cp style=\"line-height:1.38;margin-bottom:12pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#000000;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Load &amp; Stress Testing\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;\"> isn't just about finding out \"how much it can take.\" It's about building&nbsp;\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>confidence\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;\">. When that massive traffic spike hits in the middle of the night, you will stand firm, knowing exactly how your system will behave and having a failover plan already in place.\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003Cp style=\"line-height:1.38;margin-bottom:12pt;margin-top:0pt;\" dir=\"ltr\">&nbsp;\u003C\u002Fp>\u003Cp style=\"line-height:1.38;margin-bottom:12pt;margin-top:0pt;\" dir=\"ltr\">\u003Cspan style=\"background-color:transparent;color:#000000;font-family:Arial,sans-serif;\">\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>In the Next Episode (EP 135):\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;\"> We will integrate this battle-tested system into a&nbsp;\u003C\u002Fspan>\u003Cspan style=\"font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;\">\u003Cstrong>Continuous Deployment &amp; CI\u002FCD Pipeline\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;\">, ensuring that every update is delivered automatically and safely. Don't miss it!\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fp>\u003Cp style=\"line-height:1.38;margin-bottom:12pt;margin-top:0pt;\" dir=\"ltr\">&nbsp;\u003C\u002Fp>\u003Cdiv class=\"raw-html-embed\">\u003Cdiv style=\"margin:0 0 6px 0; font-weight:700;\">Read more:\u003C\u002Fdiv>\n\u003Cul style=\"list-style:none; padding:0; margin:0; line-height:1.4;\">\n  \u003Cli style=\"margin:0;\">\u003Ca href=\"\u002Fen\u002Fblogs\u002Fcategories\u002FGolang\" title=\"Golang The Series\">Golang The Series\u003C\u002Fa>\u003C\u002Fli>\n  \u003Cli style=\"margin:0;\">\u003Ca href=\"\u002Fen\u002Fblogs\u002Fcategories\u002FJS2GO\" title=\"JS2GO\">JS2GO\u003C\u002Fa>\u003C\u002Fli>\n  \u003Cli style=\"margin:0;\">\u003Ca href=\"\u002Fen\u002Fblogs\u002Fcategories\u002FTailwind%20CSS\" title=\"Tailwind CSS\">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=\"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=\"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=\"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=\"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>","cover_image_golang_the_series_ep_bca1i4gx0z.ebSocketswithk6.webp","https:\u002F\u002Ftwsme-r2.tumwebsme.com\u002Fsclblg987654321\u002Fp74ksn1anmv7y5u\u002Fcover_image_golang_the_series_ep_bca1i4gx0z.ebSocketswithk6.webp","2026-03-04 08:44:20.088Z","",{"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:20:14.253Z","ah6lvy4x8qe08l5","Golang","2026-04-10 16:07:26.172Z",{"collectionId":17,"collectionName":18,"created":24,"created_by":13,"id":25,"name":26,"updated":27,"updated_by":13},"2026-03-04 08:34:00.920Z","ecac9y661or1xka","WebSocket","2026-04-10 16:08:05.227Z",{"collectionId":17,"collectionName":18,"created":29,"created_by":13,"id":30,"name":31,"updated":32,"updated_by":13},"2026-03-04 08:44:19.453Z","s7490uhe8oarthf","k6","2026-04-10 16:12:43.471Z",{"collectionId":17,"collectionName":18,"created":34,"created_by":13,"id":35,"name":36,"updated":37,"updated_by":13},"2026-03-04 08:44:19.737Z","wfofysa5fhg0v0p","Load Testing","2026-04-10 16:12:43.560Z",{"collectionId":17,"collectionName":18,"created":39,"created_by":13,"id":40,"name":41,"updated":42,"updated_by":13},"2026-03-04 08:34:00.521Z","44l3qn47xjhwgf8","Stress Testing","2026-04-10 16:08:05.159Z",{"code":44,"collectionId":45,"collectionName":46,"created":47,"flag":48,"id":49,"is_default":50,"label":51,"updated":52},"en","pbc_1989393366","locales","2026-01-22 11:00:02.726Z","twemoji:flag-united-states","qv9c1llfov2d88z",false,"English","2026-04-10 15:42:46.825Z",{"category":54,"collectionId":55,"collectionName":56,"created":13,"expand":57,"id":71,"slug":72,"updated":73,"views":74},"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","xpb7i33hs27leyi","go-websocket-k6-load-testing-performance-tuning","2026-05-08 12:06:18.402Z",213,"p74ksn1anmv7y5u",[20,25,30,35,40],"2026-02-16 03:44:07.097Z","Prepare your Go system for massive traffic. Learn to perform Load, Stress, and Soak testing on WebSockets using k6. Discover how to identify breaking points and optimize your OS for high concurrency.","2026-05-08 06:51:47.571Z",{"th":72,"en":72}]