Github user kxepal commented on the pull request:
https://github.com/apache/couchdb/pull/389#issuecomment-194983325
Heartbeats exists to ensure that connection is alive, active and operable,
but not to keep it forever (this is actually should be done with
timeout=infinity). We cannot relay on protocol level keep-alive because it
actually doesn't works as everyone expects and only cause additional hangs
(default may be minute to hours). Application level keep-alive is the only way
to instantly figure out that things went wrong and time to reconnect.
Websockets are effective in unreliable networks because of such approach
(ping/pong).
Otherwise we have quite strange case when you do request `GET
/db/_changes?feed=continuous&heartbeat=1000&timeout=60000` expecting that
timeout will work as usually, but actually it get ignored. That's the first
case. Another one is that helps to workaround COUCHDB-2912 issue.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---