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

Change Http Client #400

Merged
merged 3 commits into from
Jun 23, 2020
Merged

Change Http Client #400

merged 3 commits into from
Jun 23, 2020

Conversation

sumeetpatil
Copy link
Contributor

@sumeetpatil sumeetpatil commented Jun 19, 2020

This PR is raised to change the standard JDK HttpURLConnection to the Apache Http client. This is done to send keep-alive probes. Changing it to Apache Http Client enables users to configure keep-alive probes by changing OS parameters like net.inet.tcp.keepidle, net.inet.tcp.keepintvl and net.inet.tcp.keepcnt.

Working process of these OS params

  1. The client opens a TCP Connection
  2. If the connection is silent for net.inet.tcp.keepidle(tcp_keepalive_time) seconds, send a single empty ACK packet
  3. Did the server respond with a corresponding ACK of its own?
    • YES - > Return to step 2
    • NO - > Wait net.inet.tcp.keepintvl(tcp_keepalive_intvl) seconds, then send another ACK. Repeat until the number of ACK probes that have been sent equals net.inet.tcp.keepcnt(tcp_keep_alive_probes). If no response has been received at this point, send a RST and terminate the connection.

Basic testing with vulas:app is done. I also tested 503 scenarios where we do retries.
I am testing more scenarios, meanwhile, you can review the code.

  • Tests
  • Documentation

@sumeetpatil sumeetpatil merged commit a23a1e6 into master Jun 23, 2020
@sumeetpatil sumeetpatil deleted the new-http-client branch June 24, 2020 06:04
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.

2 participants