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

Adding a socket handler for keep TCP connection #3422

Merged
merged 2 commits into from Dec 22, 2021

Conversation

doowonee
Copy link
Contributor

@doowonee doowonee commented Nov 19, 2020

This is not a http keepalive option. It is TCP level which is lower than HTTP.

It will send meanless ack flag packet to server.
so it wouldn't be dropped TCP connection by server side
like Firewall, Loadbalancer, Nginx etc.

Behavior overview

  • Server always close the TCP connection after 5 minutes
  • HTTP Response takes more than 10 minutes

Before behavior

커밋 설명 이전 동작

As you see the connection closed by server (RST falg)

After behavior

커밋 설명 이후 동작

Server didn't close the connection because ping pong ACK flag packets.
Actually this is a general behavior in web browsers

This is not http keepalive option it is TCP level
which is lower than HTTP.

It will send meanless ack flag packet to server.
so it woudn't be drop TCP connection by server side
like Firewall, Loadbalancer, Nginx etc.
@chinesedfan
Copy link
Collaborator

The feature is a lot special. #2808 (comment) may give you some inspirations.

@jasonsaayman jasonsaayman merged commit 55e6577 into axios:master Dec 22, 2021
mbargiel pushed a commit to mbargiel/axios that referenced this pull request Jan 27, 2022
This is not http keepalive option it is TCP level
which is lower than HTTP.

It will send meanless ack flag packet to server.
so it woudn't be drop TCP connection by server side
like Firewall, Loadbalancer, Nginx etc.

Co-authored-by: Jay <jasonsaayman@gmail.com>
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

Successfully merging this pull request may close these issues.

None yet

3 participants