Small website architecture optimization-improve anti-concurrency capability: Sub-application Separation Solution

Source: Internet
Author: User

Preface:Why should I add a "small" title, just because the previous article "small website architecture optimization: from 100 concurrent requests to 4000 concurrent requests" contains a "small" word, so this article also adds a "small.
"Small" means that the traffic in the autumn garden is small and the server configuration is low. After all, the articles are written from the actual situation.

Anti-concurrency of real websites:

Because of the performance of each website, the topic of anti-concurrency is indispensable in the end.


Maybe the website itself does not have so many concurrent accesses, but why do we need to defend against concurrency?

Because in reality, not everyone is kind and the business competition is fierce. competitors often attack websites from time to time.

Yesterday, a netizen told me that his friend's website will be attacked by competitors every Monday, resulting in service failure and server change.

Therefore, to improve the website's anti-concurrency capability, in addition to resisting users' peak visits, it is also a means of self-website protection.

What types of websites can defend against high concurrency?

In addition to external influences caused by factors such as external bandwidth, there is only one internal answer: static website.


Why can static websites defend against high concurrency?

Because static pages are said to be able to cache data and respond at the kernel level of the operating system, the anti-concurrency capability is theoretically the strongest.


Therefore, you can look at the implementation behind e-commerce websites, and most of the pages you can see are static pages.


So the technology is behind Java,. net, or php, and it seems not so special.


Of course, not all sites are suitable for static, so it is particularly important to optimize the technical architecture.

Based on the data provided by a user, it is for reference only:

The article on the CSDN homepage: 2000 concurrent and below failed. This is a service provided by java.
The CSDN blog is able to handle tens of thousands of concurrent jobs, which is a service provided by ASP. NET.


The CSDN Forum: the result of static deployment is that it can handle dozens of concurrent jobs.


Therefore, the very popular "de-. NET-based article" may be the author's personal obscenity. Of course, these data may also be the result of obscenity and may not necessarily belong to the fact.

Therefore, to increase the number of concurrent connections, not all high-end servers need reasonable code Architecture Optimization:


Background of this practice separation solution:In the article on optimization of the autumn garden system, there seems to be a few mentions of the CPU murder case caused by searching.
One day, I remembered the content in the article "differences between IIs website applications and virtual directories and advanced application instructions.


With the idea of independent search, even if the search fails, the Website access will not be affected, and you do not have to worry about the CPU murder caused by the search.

Conception:

So we started thinking:
Currently, the URL search for the autumn garden is www.cyqdata.com/search/#/search content.


In general, the keyword of an article is set as a tag to refer to the article, and I refer to the search area ).

Two ideasSolution:


A: create A second-level domain name and create A website for running. You need to run the Code:In this solution, you need to modify the URL to "success.

The advantage of this solution is that subsequent extensions can be deployed on other servers.

B: directly use the sub-application. You can directly run the separate independent sub-application without modifying the Code:

In this solution, you do not need to change the code because you can create a sub-Application Based on search.

In general, the local area server can only be in the local area network.

Solution selection:

Based on the current situation of the autumn garden, there is also a VPS.
The difference between the two solutions lies in the dynamic code and the unmovable code. Later, I chose not to move the code, because the actual effect is almost the same, so I don't move the code.

Solution 2 implementation process:


1: create a virtual directory search in IIS 6, right-click the attribute, and click "create application" in the corresponding button of the Application name. Then the virtual directory is converted to an application.
2: The project path is still the original project path, and then set a new application pool, such:650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/11413642M-0.jpg "border =" 0 "align =" absmiddle "/>

Summary:

Generally, when a project is large or the logic becomes complicated, the solution is to break it down into sub-projects.
The Decomposition Scheme is generally based on the domain name or the home page node directory.


Later I thought about it. For example, the current blog URL is: Ghost.


Of course, it is necessary to think about whether there is any direct communication to be divided into multiple processes.

This article introduces only one reference solution.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.