-
Notifications
You must be signed in to change notification settings - Fork 368
Open
Labels
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_timeoutis correctly implemented inTCPSocket(Revert "Replace Timeout.timeout in Net:HTTP#connect" ruby/net-http#74)net-http-persistent: ExtendsNet::HTTPwith thread safety and persistent connectionsexconhttbrb