Skip to content

Feature Request: Add support for persistent keep-alive connections with auto healing (that can be used to create connection pools) #222

@collimarco

Description

@collimarco

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.

  1. Define a connection pool
  2. Take a connection from the connection pool and use it from a Sidekiq Job to make the request
  3. Put back the connection in the connection pool
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions