浏览器同域名请求的最大并发数限制

在写这篇文章之前,我隐约记得好的,好像有人曾经问过我.敬飞,为什么你们京报网会有很多个图片服务器的域名?

例如:img1.bjd.com.cn、img2.bjd.com.cn、img3.bjd.com.cn 后来查找到资料,至此给大家一个结果,也做一个分享!

一、什么是图片服务器

1、图片服务器是专门为图片读写操作优化的独立服务器.运行网站的服务器称为 Web 服务器.通过 Web 服务器,用户可以访问静态网页、Web 应用程序、数据库,或者上传下载图片以及其他多媒体内容.但是,如果网站访问量不断增加,访问速度日趋缓慢,那么就应该考虑将部分功能从 Web 服务器中分离出来.通常,如果网站存在大量图片读写操作,那么应该首先把图片服务分离出来,也就是建立独立的图片服务器.
2、总得来说,部署图片服务器有以下几点好处:
1>分担 Web 服务器的 I/O 负载 - 将耗费资源的图片服务分离出来,提高服务器的性能和稳定性
2>能够专门对图片服务器进行优化 - 为图片服务设置有针对性的缓存方案,减少带宽成本,提高访问速度
3>提高网站的可扩展性 - 通过增加图片服务器,提高图片吞吐能力建立图片服务器的注意事项
3、可以使用第三方图片云存储服务实现以下好处:1. 减少图片服务器的部署时间2. 降低开发成本3. 节约资金
案例:又拍云存储
又拍云是通用的大规模存储服务,主要为用户提供静态文件存储以及 CDN 加速的服务.
又拍云在静态文件存储方面有多年的技术经验,一直专注于静态文件存储处理领域.
又拍云存储在全国各地有 26 个 CDN 节点 , 300 多台服务器以及电信、联通、移动和教育网四线带宽,能够让用户以极低的价格获得可靠、安全和快速的基础存储服务.

二、为什么很多网站的内容储存用别的域名(例图片)?有什么好处?

1、三个最主流的原因:

\1. CDN缓存更方便
\2. 突破浏览器并发限制,目前浏览器去某个域名并发限制在10左右
\3. Cookieless, 节省带宽,尤其是上行带宽 一般比下行要慢,统一域名的访问默认都带cookie

2、还有另外两个非常规原因:

\4. 对于UGC的内容和主站隔离,防止不必要的安全问题( 上传js窃取主站cookie之类的) .
正是这个原因要求用户内容的域名必须不是自己主站的子域名,而是一个完全独立的第三方域名.
\5. 数据做了划分,甚至切到了不同的物理集群,通过子域名来分流比较省事. ^_^ 这个可能被用的不多.

PS: 关于Cookie的问题,带宽是次要的,安全隔离才是主要的.
关于多域名,也不是越多越好,虽然服务器端可以做泛解释,浏览器做dns解释也是耗时间的,而且太多域名,如果要走https的话,还有要多买证书和部署的问题,^_^.

三、图片服务器域名的选择

1、观察京东图片,使用多个独立ip:img1.360buyimg.com、img2.360buyimg.com、img3.360buyimg.com…这个应该是为了突破浏览器并发限制,也可能进行了分模块管理.

2、海选图片全部是img.haixuan.com,这是一个二级域名,海选采用淘宝TFS分布式文件系统,二级域名纯粹是为了省钱省事,不需要去相关部门进行备案好维护.

点赞 ( 0 )

47 条评论

  1. cheap flight

    Hi my loved one! I wish to say that this article is amazing, great written and come with almost all important infos. I would like to look more posts like this .

  2. insanely cheap flights

    Very good article! We will be linking to this particularly great article on our site. Keep up the good writing.

  3. I've learn some just right stuff here. Definitely price bookmarking for revisiting. I wonder how so much effort you put to create such a excellent informative website.

  4. cheap flights booking

    Howdy just wanted to give you a quick heads up and let you know a few of the images aren't loading correctly. I'm not sure why but I think its a linking issue. I've tried it in two different browsers and both show the same results.

  5. air ticket

    I really love your website.. Excellent colors & theme. Did you develop this web site yourself? Please reply back as I'm looking to create my own personal site and want to learn where you got this from or just what the theme is called. Thank you!

  6. gamefly

    This piece of writing offers clear idea for the new users of blogging, that in fact how to do blogging and site-building.

  7. Stebalovo.ru

    When I initially commented I clicked the "Notify me when new comments are added" checkbox and now each time a comment is added I get several emails with the same comment. Is there any way you can remove me from that service? Bless you!

  8. site

    Hello There. I discovered your blog the use of msn. That is a very well written article. I will be sure to bookmark it and return to read more of your useful info. Thank you for the post. I'll certainly comeback.

  9. site

    I every time used to study article in news papers but now as I am a user of web therefore from now I am using net for posts, thanks to web.

  10. houston junk car buyer

    I relish, cause I found exactly what I was taking a look for. You've ended my 4 day long hunt! God Bless you man. Have a great day. Bye

  11. Orval

    Orval

  12. sites.google.com/view/esigatr/

    Thanks very interesting blog!

  13. takipçi satın al

    Howdy! This is my first visit to your blog! We are a collection of volunteers and starting a new initiative in a community in the same niche. Your blog provided us beneficial information to work on. You have done a marvellous job!

  14. instagram takipçi satın al

    Hey There. I discovered your weblog the usage of msn. That is a really neatly written article. I will be sure to bookmark it and come back to read extra of your useful information. Thank you for the post. I'll certainly comeback.

  15. instagram izlenme al

    I am curious to find out what blog platform you happen to be utilizing? I'm having some minor security issues with my latest site and I'd like to find something more safe. Do you have any suggestions?

  16. türk takipçi satın al

    This site really has all the info I wanted about this subject and didn't know who to ask.

  17. Vaporesso Elektronik Sigara

    Elektronik sigara için https://linktr.ee/elektromanyetik Vaporesso Elektronik Sigara vazgeçemeyeceğiniz duman keyfini sunar.

  18. türk takipçi satın al

    Hello, I would like to subscribe for this website to get newest updates, therefore where can i do it please assist.

  19. instagram

    I'm not sure where you're getting your info, but great topic. I needs to spend some time learning more or understanding more. Thanks for wonderful information I was looking for this information for my mission.

  20. wso shell

    If you would like to get a great deal from this paragraph then you have to apply such techniques to your won blog.

  21. voopoo argus elektronik sigara

    Hello! This post couldn't be written any better! Reading this post reminds me of my previous room mate! He always kept talking about this. I will forward this article to him. Pretty sure he will have a good read. Thanks for sharing!

  22. ucuz

    This article will assist the internet people for building up new website or even a blog from start to end.

  23. beğeni al

    Hi there, just became alert to your blog through Google, and found that it is really informative. I am gonna watch out for brussels. I will appreciate if you continue this in future. Many people will be benefited from your writing. Cheers!

  24. takipçi satın al

    I always emailed this weblog post page to all my contacts, since if like to read it next my links will too.

  25. instagram takipçi

    whoah this blog is fantastic i love reading your articles. Stay up the good work! You already know, many persons are looking around for this information, you could help them greatly.

  26. ElektronikSigara

    It's truly very complicated in this active life to listen news on Television, thus I just use internet for that purpose, and obtain the most up-to-date information.

  27. beğeni satın al

    Good article. I will be dealing with some of these issues as well..

  28. Joyetech Elektronik Sigara

    I got this web page from my buddy who shared with me about this web site and now this time I am browsing this web page and reading very informative articles or reviews at this place.

  29. E Sigara

    Hello, i think that i saw you visited my website thus i came to “return the favor”.I am attempting to find things to improve my web site!I suppose its ok to use a few of your ideas!!

  30. Juul

    This page truly has all the information I needed concerning this subject and didn't know who to ask.

  31. Türk takipçi satın al

    Hello There. I found your blog using msn. This is a really well written article. I will make sure to bookmark it and come back to read more of your useful info. Thanks for the post. I'll certainly comeback.

  32. takipçi satın al

    Hi, I would like to subscribe for this weblog to obtain hottest updates, therefore where can i do it please help out.

  33. instagram takipçi

    If some one wishes expert view regarding blogging and site-building then i propose him/her to visit this webpage, Keep up the pleasant work.

  34. takipcimir.blogspot.com

    Hi there friends, good article and fastidious arguments commented at this place, I am in fact enjoying by these.

  35. sifresizinstagramtakipci

    There is definately a great deal to learn about this subject. I really like all of the points you made.

  36. I must thank you for the efforts you've put in penning this site. I am hoping to see the same high-grade blog posts by you in the future as well. In fact, your creative writing abilities has motivated me to get my own blog now ;)

  37. Takipçi satın al

    Thanks , I've recently been looking for information about this topic for ages and yours is the greatest I have came upon so far. But, what about the bottom line? Are you certain in regards to the supply?

  38. linksly.me/CimZ

    Hello to all, it's in fact a pleasant for me to pay a visit this web page, it contains priceless Information.

  39. Evden eve nakliyaT

    Currently it appears like Drupal is the top blogging platform available right now. (from what I've read) Is that what you're using on your blog?

  40. instagram takipçi satın al

    I think this is one of the most significant info for me. And i'm glad reading your article. But wanna remark on some general things, The web site style is wonderful, the articles is really great : D. Good job, cheers

  41. takipçi satın al türk

    Thanks to my father who told me on the topic of this website, this blog is actually awesome.

  42. abone satın al

    Can you tell us more about this? I'd like to find out some additional information.

  43. instagram beğeni satın al

    Can you tell us more about this? I'd want to find out some additional information.

  44. sigmarkalari.blogspot.com

    I do agree with all of the ideas you have offered in your post. They're really convincing and can certainly work. Still, the posts are too quick for starters. Could you please prolong them a little from next time? Thank you for the post.

  45. baboogeldi.blogspot.com

    Because the admin of this web page is working, no question very soon it will be well-known, due to its quality contents.

  46. tenimkusolmustenimee.blogspot.com

    Hi! Do you know if they make any plugins to assist with SEO? I'm trying to get my blog to rank for some targeted keywords but I'm not seeing very good success. If you know of any please share. Kudos!

  47. I'm curious to find out what blog system you are working with? I'm having some minor security problems with my latest site and I'd like to find something more risk-free. Do you have any suggestions?

发表评论

人生在世,错别字在所难免,无需纠正。

插入图片
s
返回顶部