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

update script concat recommendation for HTTP/2 #391

Closed
wants to merge 2 commits into from

Conversation

balupton
Copy link

@balupton balupton commented Feb 2, 2017

  • In HTTP/1 multiple requests are slow as they block on the TCP level, as such, in HTTP/1 concatenation is better, as it eliminates the performance benefit of having a single request eliminating the blocking risk
  • In HTTP/2 multiple requests occur in parallel on the TCP level, as such eliminating the need of the HTTP/1 concatenation practice while offering similar performance
  • Using multiple requests increases the likelihood of a request being bundled, especially if the resource is popular, especially in the cases of CDN usage - whereas concatenation eliminates this benefit, as parts of the bundle cannot be cached as only the whole bundle can be
  • As HTTP/2 multiple requests offers the same benefits of HTTP/1 single requests (concatenation) but as multiple requests increases chances of caching, then using multiple requests with HTTP/2 offers better performance over HTTP/1 concatenation practices

- In HTTP/1 multiple requests are slow as they block on the TCP level, as such, in HTTP/1 concatenation is better, as it eliminates the performance benefit of having a single request eliminating the blocking risk
- In HTTP/2 multiple requests occur in parallel on the TCP level, as such eliminating the need of the HTTP/1 concatenation practice while offering similar performance
- Using multiple requests increases the likelihood of a request being bundled, especially if the resource is popular, especially in the cases of CDN usage - whereas concatenation eliminates this benefit, as parts of the bundle cannot be cached as only the whole bundle can be
- As HTTP/2 multiple requests offers the same benefits of HTTP/1 single requests (concatenation) but as multiple requests increases chances of caching, then using multiple requests with HTTP/2 offers better performance over HTTP/1 concatenation practices
@jsf-clabot
Copy link

jsf-clabot commented Feb 2, 2017

CLA assistant check
All committers have signed the CLA.

icambron added a commit to icambron/momentjs.com that referenced this pull request Mar 12, 2017
See discussion in moment#391
This was referenced Mar 12, 2017
@icambron
Copy link
Member

I think it would be simpler if we just remove the advice altogether. Moment's docs don't need to be a repository of best practices for HTTP. Closing in favor of #403

icambron added a commit that referenced this pull request Mar 12, 2017
See discussion in #391
@icambron icambron closed this Mar 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants