Reflections on large sites technology evolution (a): storage bottleneck (1) Thinking about technology evolution of large sites (2): The memory bottleneck (2) Air Jordan Outlet Consideration on large sites technology evolution (iii): storage bottleneck (3 ) Thinking about technology evolution of large sites (IV): storage bottleneck (4) Thinking about technology evolution of large sites (V): storage bottlenecks (5) Reflections on the technical evolution of large sites (VI): Bottleneck stored ( 6) Thinking about technology evolution of large sites (VII): storage bottlenecks (7) Thinking about technology evolution of large sites (VIII): storage bottlenecks (8) in the opening I mentioned storage bottlenecks such as navigation site hao123 As long as it is a sufficient number of deployed web server, it can host large scale concurrent access volume, if it is a dynamic website, in particular the use of the database of the site is difficult to do by increasing the number of web servers way to effectively increase website Concurrent access capabilities. But the reality is that, like Taobao, Jingdong such a large dynamic website in case of bear high concurrency of any course to ensure rapid response, which, what kind of technology can achieve dynamic website supports high concurrency scenarios, and this may be question each to make friends are interested in web development, and today I will write a new series to discuss this issue, I hope my experience and research to give most people to enlightenment. Here we must note, in this series of writing and storage bottlenecks in the wording is different, the beginning part of this series is to explain the principle behind section will explain the specific implementation for the principle means, if you have friends feel such an approach suited, also Please acknowledge. Personally, I conclude that the reason why large dynamic website can be done quickly respond to high concurrency, they try to make their own websites are static, of course, this is by no means static on the site made a static website, but in full We understand static website increase site responsiveness on the basis of dynamic site improvement, so I am here to discuss those characteristics first static website can be used in our website to enhance the response speed. Static website is very simple, it is after a url to access the web through a web page on the server, web server receives a request over the network using the http protocol will return to the web browser, the browser via http protocol will eventually resolve the page displayed in browser , sometimes this website would be more complex point, which contains a number of additional resources, such as: images, external css files, js files, and external flash like some multimedia resources, and these resources are used alone the information back to the http protocol browser, browser from the pages of src, href, Object such tags and pages of these resources together, eventually display the page in a browser. But no matter what type of resources that if we do not change them manually, then we get the results of each request is the same. This shows a characteristic of static pages: Static pages resource basically does not change. Therefore, we first visit to a static Web page and our subsequent visits to this static page is a repeat of the request, which the site loading speed is basically determined by the speed of the network transmission, and the size of each resource request, since access The resource does not substantially change, then we repeat the request these resources, waited in vain for yourself out there is not a waste of time? Almost the case, the browser appears cache technology, we develop those resources when you can write the same corresponding commands on the http protocol, after these instructions will make the first visit to the browser cache static resources from these static resources, users first Second visit this page when it is no longer required to repeat the request, because the request for resources in the local cache, then get its efficiency becomes extremely efficient. Since the requested resource is not static websites change frequently, then this resource is very easy to be migrated, we all know that the efficiency of network transmission distance is the length of a relationship, since static resources can easily be migrated then we can The static resource server geographically distributed across multiple service nodes, when a user requests a Web site when the routing algorithm according to the request on the ground nodes closest to the user, so that you can reduce the transmission distance of a network so as to enhance the efficiency of access, which is We long to mention the famous CDN technology, content delivery network technology. Network transmission efficiency New Nike Free Run 3 Shoes Silver 3 but also, and the size of our transmission resources, and therefore we have to be compressed before transmission resources, reducing the size of the resource so as to achieve the purpose to enhance the transmission efficiency; in addition, every http request is actually a request tcp, these The number of requests to establish connections and to release the connection will consume a lot of system resources, these New Nike Free 5.0 V4 Grey Blue Running Shoes properties often consume itself bigger Nike Heels Boots than the content, and therefore we will try to reduce the http requests to enhance the transmission efficiency to achieve the purpose or use long connection to http establish a connection and release connections eliminate the overhead (using long connection depends on the specific scene, which I will talk about later in this article). In fact, Yahoo's proposed site optimization 14 recommendations are mostly derived based on the above principles, conditions on Yahoo's 14 recommendations, later in this series will be discussed in detail, here is not carried out. I often thought that the best means is to use caching to optimize performance, but data cached data are generally those who do not frequently change was mentioned above, the browser cache, CDN fact can be understood as a buffer means, They also enhance the performance of one of the most effective ways the site, but these caching technology to the dynamic website has become very bad implementation, which in the end is how the matter? First, what is different dynamic Web sites and static website? I think the difference between static and dynamic web site is dynamic website pages although there is a url, but if we transfer parameters are different then the url requested page is not exactly the same, that is to say the content of dynamic website pages depending on the conditions that will change , but the content of these changes is the same url, url is the address of a static website in a resource, then the dynamic website in an address at the resource actually is different. Because this difference so we can not be effective for the dynamic page caching, and improper use of the cache will throw an error, so the dynamic page where we will not be the browser cache in meta Settings page. If the content of dynamic pages per visit that page is completely different, maybe we do not need to write static website theme, and the reality of the dynamic pages are often just one part of change, such as the electricity supplier website menu, page header, page tail which in fact will not change frequently, if only because we are a small part of the page changes frequently so that must be repeated each time a user requests access to these duplicate resources, which in fact is very computationally expensive, we come Be calculate it, if a dynamic page content of these same 10k, the pages have visited 10 million times a day, then a day off will consume 100 million kb Air Jordan Heel of network resources, this is very worthwhile, and these repeat broadband resource consumption does not bring benefits to the site's user experience, but rather to slow down the efficiency of the web page to load. Then we have Nike Jordan Melo B Mo to consider splitting the page, and the page make a separate movement, so that the static part as unchanging static resource processing, dynamic content or dynamic process, and where appropriate the movement is incorporated together. Here's a key point is the location of the merger movement, chose this location will directly lead to architectural design of our entire web front end. We are here to java web development, for example, to talk about this issue. java web development where we typically use to write jsp page, of course, also possible to use a template engine development page advanced point such as velocity, freemark etc., whether we use the jsp page or template engine, which is similar to html files are not really The html, such as jsp nature is actually a servlet is a java program, so their essence is an integrated technical service side language and the html, web container based on the service side of the return data will jsp or template engine resolved to browse in the Air Max 2011 Womens Grey Green actual operation It is able to parse html, then transfer this html to Nike Air Max the browser for resolution. This shows that the service side language pages provide technical development is actually the source of Mens Nike Free Run 3 Shoes Black 3 the movement can not be separated, but these techniques can be a good resource to Nike Lebron 10(X) complete the movement of content moving, so we want to first of all make it static and dynamic separation of static resources jsp or extracted from the template language out of static resources extracted certainly going to a static web server to handle, we used static resource server is usually apache or ngnix, so these static resources should be placed on such a server, So if we could do the movement on these static web servers combine it? The answer is really OK, such as apache server has a module can be integrated static resources and server resources to transport its own stores, this technology is called ESI, CSI, this time we can put unchanging static content production to Place the template on a static server, dynamic content reaches static resource server when using ESI or CSI label, the combination 585388-083 Anti-Nerf Nike KD V Elite Outlet of dynamic and static content, which completes a dynamic and static operation. Here there is a problem, I mentioned earlier CDN, CDN is actually a collection of static web server, so we can put these things into CDN done? Theoretically it can be done, but the reality is not so good to do, because in addition to some of the ultra-wealthy Internet companies, most companies use a CDN are provided Nike Free Run 3 by third parties, third-party CDN is often a common program, Coupled with other people after all, not one of us, but the main purpose is not to make CDN static and dynamic separation, so in most cases complete such operations on the CDN is not so smooth, so we often end before the web container service plus a static web server, the static server acts as a reverse proxy role, it can do many things, one of the things it is that we can complete this dynamic and static problems. So Nike Free Run 3 Women we put this juncture movement to push forward again, pushing to the browser, the browser can do this thing? If the browser can, so it can cache static resources on the client, which in CDN cache efficiency ratio even higher, in fact, the browser really can do this, especially after the Nike Free 5.0 V2 Women emergence of ajax technology, browser integration The movement of resources will become much easier. In general, however, we do use ajax movement are all separated from the server requests a html fragment to the browser, using dom technology will be integrated into the page in this segment, although this has been more than a full page return many efficient, but He still has problems, complete the server processes the request eventually return results are actually very pure data, but these data into the page fragment we have returned to the browser, which is the pure essence adding a lot of data and services end useless structures, the reason that the browser itself useless because these structures can be done, and why we must let the server to do this thing? If so almost javascript template technology emerged, these templates technology and jsp, velocity, except that they are designed template language through javascript, with the javascript template language, the server can not be considered complete processing a page, it only needs to be valid data is returned to the page on the line, use the javascript template technology, it allows us to separate the movement of resources to do a more thorough, substantially all browsers related things are static, the service side need only the most primitive data Transfer to the browser. Here we talked about when it comes to the web front end of the most cutting-edge technology: javascriptMVC architecture of. Well, today I write to you, this article said the site is always static processing theory, the latter article I will talk a little bit of static sites to achieve a variety of technical 2015 Nike Free 5.0 implementation details.Thinking about technology evolution of large sites (ix) - site static treatment - Overview (1)