Feature Request: Add support for persistent keep-alive connections with auto healing (that can be used to create connection pools)
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- ruby
- Domain
- networking
Research direction
Start by reading Net::HTTP's existing connection lifecycle and the connection_pool README referenced in the issue. Define how persistent connections are pooled, reused across Sidekiq jobs, and repaired after server-side closure; completion would require agreed behavior and tests for these cases.
Written by the indexing model from the issue text.
Description
Hello,
We have a scenario (push service) where we need to send thousands of HTTP requests per second to the same host. We use Sidekiq to scale this workload. The problem is that every request (in a Sidekiq Job) starts a new connection, makes the request, closes the connection.
It would be a great performance improvement if we could use a gem like this https://github.com/mperham/connection_pool to create a connection pool for HTTP requests.
- Define a connection pool
- Take a connection from the connection pool and use it from a Sidekiq Job to make the request
- Put back the connection in the connection pool
- The connection can be reused by other Sidekiq Jobs to make other HTTP requests to the same host.
The problem, as described in the ConnectionPool readme, is this:
connections should be self-repairing.
For example if a keep alive connection is closed on the server side, this library gives errors, but does not retry / repair the connection automatically.
It would be great to have support for persistent keep-alive connections and auto healing directly in Ruby.
- Dominant language
- Ruby
- Stars
- 148
- Forks
- 95
- Avg merge
- 10h 54m
- Merged PRs (30d)
- 4
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ruby/net-http
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
-
Difficulty 5/5 Over a week Newbie friendliness 38/100
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Similar issues
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
TheOdinProject/curriculum#31408 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bensheldon/good_job#1816 · 5 comments ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
notch8/utk_knapsack#148 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Homebrew/homebrew-cask#288729 · 1 comment ·