We know, for a large Web site is, scalability is very important, how there is good in the vertical and horizontal scalability, you need to do architecture at a time when taking into account the principle of a point, I think in a multi- aspect of the point of how to divide:
1. Great site to resolve a number of smaller sites: a site when we have multiple functions, they can consider this site split into several small modules, each module can be a website, so we have time we can very flexible to deploy these sites to a different server.
2. Static dynamic separation: the best static files and dynamic files into two separate sites, we know that static websites and dynamic websites focusing on different servers, the pressure, the former the latter may be re-re-IO CPU, then we in the choice of hardware when you can have focused, and static and dynamic content caching strategies are not the same. Typical applications, we generally have a separate file or image server.
3. In accordance with the features points: for example, a module is responsible for the upload, upload operation is very time consuming, if mixed with other applications, then very likely, access will make the server a little bit of paralysis, this particular module should be separated . Security should also secure separate SSL also need to consider future purchase.
4. We do not have to all use their own servers, search, reports can rely on other people's services, such as google search and reporting services, do not own more than others too, server bandwidth is saved.
Second, the sub-vertical:
1. Document also equivalent to the database, IO traffic may be bigger than the database, it would be of vertical levels of access, upload files and WEB server image must be separated. Of course, databases and Web sites on a server rarely, and this is the most basic.
2. Relating to database access for the dynamic program, we can Shiyong a middle layer (known as the Ying Yong layer or logical layer) Lai visits Shu Juku (deployed in stand-alone server), the greatest advantage is Huancun and Ling Huoxing. Larger cache Di memory footprint, we want it and the site Jinchengfenkai and to do so we can easily to change the Celue some data Fang Wen, Ji Shi Dao when the database You Fenbu of Hua let you do a Tiaopeigongzuo, this flexibility the very old. There is a middle layer of the benefits of CNC can do a bridge wire may then access Telecom Netcom access two-lane direct access to telecommunications than Netcom fast server.
Some people say I am none I can do load balancing, yes, it is possible, but if the points, the same 10 machines Kending Bi, regardless of 10 machines can take more visits, but also the hardware requirements may not be high, because we know what hardware needs particularly well. Let Qi for each service is not free but march is too busy to combine a reasonable adjustment and expansion, this system scalability on high, to adjust traffic according to the premise that taking into account the prior points, good points flexibility, scalability, isolation and security.
On the server, we have a few points to long-term observations, and any point may be the bottleneck:
1. CPU: Analysis of dynamic documents need more CPU, CPU is the bottleneck depends on which features are not too long occupation of the thread, if it is to break off. Or is that every request processing time is not long, but the traffic is high, then add the server. CPU is a good thing, not let him dry and so on, not doing anything.
2. Memory: Cache separate out from the IIS process, generally on the WEB server is not a lot of memory would not be enough. Faster than disk memory to reasonable use.
3. Disk IO: Performance Monitor to find which file IO particularly, to find a group on the assigned separate file server up, or directly to do CDN. Disk slow, large-scale application by reading the data cache, a large-scale application can write data to reduce the burst by concurrent queue.
4. Network: We know that network traffic is relatively slow, slower than the disk, if it is to do a distributed cache, distributed computing, then, taking into account the physical network communications between the server time, of course, big traffic later, which can increase system capacity to a level of acceptance. Static content can be shared with CSD as part of a time when doing server assumptions also consider the situation of China Netcom, and telecommunications features firewall.
On the SQL SERVER database server is [UPDATE]:
In fact, the level of segmentation and vertical segmentation is a two-dimensional table, cross over the level of segmentation is to cut back, cut back the longitudinal split is vertical:
1, vertical segmentation is that different applications can be assigned to our different DB in different instances, or to a table field has split into many small tables.
2, horizontal partitioning is that some applications may not load, such as user registration, but users will be very large table, large table can be separated. Can use table partitioning, data is stored in different files, and then deployed to separate physical server to increase read and write IO throughput which improve performance, land a regular basis point is the old way of data archiving. Another advantage of the table partitions can increase the speed of data query, because we can have multi-page index, and like a file folder not too many layers of folders as hyperfractionated.
3, but also through database mirroring, replication subscription, transaction log, to read and write to a different image physically separate database, general enough, if still does not work you can use the hardware to realize the database load balancing. Of course, for BI, we may also have data warehouse.
Structure to be considered after these, traffic flow, and Jiukeyizai the Jichu on this go to adjust or do WEB server or Ying Yong server's Fuzaijunheng. Very often we are found to repeat the question - "to find bottlenecks -" to resolve the process.