cloudfoundry / cloudfoundry/cloud_controller_ng
Consolidate `HTTP` Clients
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 207
- Forks
- 373
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 56
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:
#3002
#3048
#3170
#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(https://github.com/ruby/net-http/pull/74)net-http-persistent: ExtendsNet::HTTPwith thread safety and persistent connectionsexconhttbrb
Contributor guide
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.
Research direction
Start by inventorying the HTTP usage in lib/services/sso/uaa/uaa_client_manager.rb, lib/vcap/services/api/clients/service_gateway_client.rb, cdn.rb, async_requests.rb, and the named OPI, Routing, UAA, Diego, Credhub, and service_brokers entry points. Compare candidate clients against thread safety, DNS failover, timeout, and connection requirements, using the dns-failover-test project and issues #3002, #3048, #3170, and #3174. Done means the project uses one suitable client everywhere and the listed requirements are verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- backend, networking
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100