Skip to content

Change Http Client#400

Merged
sumeetpatil merged 3 commits intomasterfrom
new-http-client
Jun 23, 2020
Merged

Change Http Client#400
sumeetpatil merged 3 commits intomasterfrom
new-http-client

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 requested a review from henrikplate June 19, 2020 09:55
@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

Comments