AWS NLB发送的未知TCP Keep-alive数据包可能是由于默认超时值太短而触发的。我们可以通过在Target Group的健康检查设置中调整超时值来解决此问题。例如,将超时值从默认的5秒增加到60秒:
aws elbv2 modify-target-group --target-group-arn --health-check-timeout-seconds 60
此外,您还可以忽略这些未知的TCP数据包,以避免对客户端产生影响。在Target Group的健康检查设置中增加一个Health Check Interval参数。在此示例中,我们将该值设置为60秒:
aws elbv2 modify-target-group --target-group-arn --health-check-interval-seconds 60
这样就可以将未知的数据包忽略掉,并且客户端不会再收到这种数据包。