You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi
"nginx_sts_upstream_connects_total", I rely on this indicator to count the cps of nginx. After testing, it is found that this counter does not increase by 1 when the tcp handshake succeeds, but only after the tcp wave ends. Can you change it? I don't think it makes sense to increase this counter after the connection is disconnected, because the TCP connection usually lasts for a long time.
test code:
tcp_server.py:
importsocketimportthreadings=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind(('0.0.0.0', 4444))
s.listen(5)
print('Waiting for connection...')
deftcplink(sock, addr):
print('Accept new connection from %s:%s...'%addr)
whileTrue:
data=sock.recv(1024)
ifnotdataordata.decode('utf-8') =='exit':
breaksock.send(('Hello, %s!'%data.decode('utf-8')).encode('utf-8'))
sock.close()
print('Connection from %s:%s closed.'%addr)
whileTrue:
sock, addr=s.accept()
t=threading.Thread(target=tcplink, args=(sock, addr))
t.start()
hi
"nginx_sts_upstream_connects_total", I rely on this indicator to count the cps of nginx. After testing, it is found that this counter does not increase by 1 when the tcp handshake succeeds, but only after the tcp wave ends. Can you change it? I don't think it makes sense to increase this counter after the connection is disconnected, because the TCP connection usually lasts for a long time.
test code:
tcp_server.py:
nginx conf:
tcp_client.py:
the number of connections cannot be counted in the beginning of a period of time:
connections can be seen in 60 seconds
This is because I set proxy_ timeout 60s;
The text was updated successfully, but these errors were encountered: