Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Acks every 15 seconds #28

Closed
dimalukas opened this issue Jul 14, 2022 · 1 comment
Closed

Acks every 15 seconds #28

dimalukas opened this issue Jul 14, 2022 · 1 comment

Comments

@dimalukas
Copy link

Hi,
While I was monitoring network traffic on my device I saw that every 15 seconds there are acks being sent between the longpoll client and server.
Is this the intentional behavior?
The activity does not need to be ‘silent’ until a timeout occurs or a disconnect or a publish?
@jcuga
D7BF0ED5-EA28-4574-9534-F433102B58DF

@jcuga
Copy link
Owner

jcuga commented Jul 29, 2022

@dimalukas this sounds like tcp keepalive.

See: https://tldp.org/HOWTO/TCP-Keepalive-HOWTO/overview.html

This occurs at the TCP/transport level, before the HTTP/application level. So there will be no http data being sent, but you will see at the lower TCP level some zero-data ACKs that are part of the tcp-keepalive. The keep alive time is configurable usually at the OS level, not at a per-socket or per-application level.

Without keep-alives, there'd be no way for each side of the connection to know when a connection gets dropped.

This occurs at a lower, more fundamental level than HTTP and golongpoll specifically. I'd recommend looking at the traffic in wireshark or similar tool to verify that this is indeed zero-data keepalive traffic if you are concerned.

To your question about being "silent" until there is data (or a longpoll-timeout)--at the HTTP/application level, yes, there should be no data/communication.

@jcuga jcuga closed this as completed Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants