Open
Description
Issue
cloud_controller_ng
uses multiple HTTP clients:
Gem | used for | last updated |
---|---|---|
Net::HTTP |
uaa_client_manager.rb service_gateway_client.rb |
Ruby system package |
httpclient |
cdn.rb (fog) OPI Routing UAA Diego Credhub service_brokers |
2016 |
em-http-request |
async_requests.rb |
2021 |
Goal
The same HTTP client should be used everywhere
Requirements
- Should receive regular updates
- Should handle DNS failovers, see:
Diego::Client targets active bbs instance with id from locket #3002
Diego client tries all bbs domain IPs #3048
Use Net::HTTP::Persistent in Diego client #3170
Patch HTTPClient to accept socket_connect_timeout #3174
Can be tested locally with https://github.com/johha/dns-failover-test - Should be thread safe
- Should allow persistent connections (nice to have)
Some Suitable HTTP Clients
Net::HTTP
: Default Ruby HTTP client which could be sufficient as soon asconnect_timeout
is correctly implemented inTCPSocket
(Revert "Replace Timeout.timeout in Net:HTTP#connect" ruby/net-http#74)net-http-persistent
: ExtendsNet::HTTP
with thread safety and persistent connectionsexcon
httbrb