My app sends multiple API requests and get responses in background jobs to third party server. For now every job opens new Http connection and closes it after receiving a response. If it's possible to share this connection between all my app's jobs? How to keep it alive while a pool of jobs is in progress? How to close it at the end? Thanks.
This is what a connection pool is designed for.
https://github.com/mperham/sidekiq/wiki/Advanced-Options#connection-pooling