0

我在 AWS t2.xlargeec2 机器上的 NodeJS 上运行了套接字 IO 应用程序。我试图在t2.xlargeAWS 机器上达到 60K 并发端口。

我做了以下更改ec2

/etc/sysctl.conf文件:

net.ipv4.ip_local_port_range = 12000 65535
fs.file-max = 1048576

/etc/security/limits.conf

*           soft      nofile     1048576
*           hard      nofile     1048576
root        soft      nofile     1048576
root        hard      nofile     1048576 

我正在使用artillery负载测试。当我们达到约 30K 端口时,artillery开始显示错误:

Report @ 10:41:05(+0000) 2021-06-10
Elapsed time: 23 minutes, 20 seconds
  Scenarios launched:  250
  Scenarios completed: 0
  Requests completed:  0
  Mean response/sec: NaN
  Response time (msec):
    min: NaN
    max: NaN
    median: NaN
    p95: NaN
    p99: NaN
  Errors:
    Error: websocket error: 250

Report @ 10:41:15(+0000) 2021-06-10
Elapsed time: 23 minutes, 30 seconds
  Scenarios launched:  250
  Scenarios completed: 0
  Requests completed:  0
  Mean response/sec: NaN
  Response time (msec):
    min: NaN
    max: NaN
    median: NaN
    p95: NaN
    p99: NaN
  Errors:
    Error: websocket error: 250

我使用netstat -anp|grep ESTABLISHED | grep -w 80 > ports命令来检查打开的并发端口。

4

0 回答 0