Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from ipfs:master #95

Merged
merged 1 commit into from
Sep 10, 2019
Merged

Conversation

pull[bot]
Copy link

@pull pull bot commented Sep 10, 2019

See Commits and Changes for more details.


Created by pull[bot]. Want to support this open source service? Please star it : )

Adds limit of concurrent HTTP requests sent to remote API
by dns and preload calls when running in web browser contexts.

Browsers limit connections per host (~6). This change mitigates the
problem of expensive and long running calls of one type exhausting
connection pool for other uses.

It additionally limits the number of DNS lookup calls by introducing
time-bound cache with eviction rules following what browser already do.

This is similar to:
libp2p/js-libp2p-delegated-content-routing#12
@pull pull bot added the ⤵️ pull label Sep 10, 2019
@todo
Copy link

todo bot commented Sep 10, 2019

/api/v0/dns does not return TTL yet: ipfs/kubo#5884

// TODO: /api/v0/dns does not return TTL yet: https://github.com/ipfs/go-ipfs/issues/5884
// However we know browsers themselves cache DNS records for at least 1 minute,
// which acts a provisional default ttl: https://stackoverflow.com/a/36917902/11518426
const ttl = 60 * 1000
// browsers limit concurrent connections per host,


This comment was generated by todo based on a TODO comment in cf38aea in ipfs#95. cc @ipfs.

@todo
Copy link

todo bot commented Sep 10, 2019

replace hardcoded host with configurable DNS over HTTPS: ipfs/helia-ipns#53

// TODO: replace hardcoded host with configurable DNS over HTTPS: https://github.com/ipfs/js-ipfs/issues/2212
const api = ky.create({
prefixUrl: 'https://ipfs.io/api/v0/',
hooks: {
afterResponse: [
async (input, options, response) => {


This comment was generated by todo based on a TODO comment in cf38aea in ipfs#95. cc @ipfs.

@pull pull bot merged commit cf38aea into daddyfatstacksBIG:master Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant