【負荷試験】k6
VIRTUAL USERS
k6 runs multiple iterations in parallel with virtual users (VUs). In general terms, more virtual users means more simulated traffic.
VUs are essentially parallel while(true) loops. Scripts are written in JavaScript, as ES6 modules, so you can break larger tests into smaller pieces or make reusable pieces as you like.
k6 の executor のまとめ
dial tcp : I/O timeout がで続けてしまう
k6 で負荷試験をしている時にどうしても dial tcp : I/O timeout
が出てしまう。
似たようなシナリオを Locust で実行すると正しく実行できる。
この時諸々調査した記事
この記事はツールなどを使って解決をするアプローチをとっているので良さそう
Understanding the Problem
Imagine running a K6 performance test script targeting an API endpoint. Suddenly, your test logs start displaying "dial tcp: I/O timeout" errors. This usually indicates that the connection between K6 and your server is failing due to network issues or server-side limitations.
これによると、Network のエラーぽいけど、Locust では実行できちゃうのは何で?が分かっていない。
Network Connectivity Issues:
- Problem: The network connection between K6 and your server might be unstable, leading to slow or dropped connections.
- Solution:
- Check Network: Verify your network connectivity using tools like ping or traceroute.
- Optimize Network: Ensure a stable network connection for K6 and your server.
- Use Network Monitoring: Tools like Wireshark can help identify network bottlenecks.
Wireshark, Ping, Traceroute ここら辺は試してみても良さそう