Do not involve specific technology, are bad street things, just a simple summary.
1 Front-end domain splitter
Different content is obtained from servers of different domain names. It is important to note that cookies cannot be accessed across domain names.
Under the main domain name will generate some cookies, through different static files, than tablets, JS, etc., through other domain access to obtain, can save the traffic generated by the cookie.
2 page static
Data that frequently needs to be queried from the database needs to be displayed in the Web page. Generate HTML static pages directly on the server side. Access directly to the request HTML file.
3 CDN
CDNs are generally applied only to static resources. Solve the space line problem.
The hub server publishes the resource and then issues it to the CDN server. The client's request is resolved through DNS to the IP address of the closest server to the client line.
4 static file compression and merging
JS CSS and other files using the Code compression tool to press.
CSS Sprite is a typical merging scheme. Combine small images together to display a small portion of a large picture through CSS when displaying a picture.
5 Separation Ideas
Different details of the same thing are implemented using different component programs to complete the separation of functions. Like what:
- Upload and download separate.
- Programs that consume resources (CPU or memory) are detached from the Web server.
- Database read-write separation.
Separation is a very important idea in architecture design. There's not much to say here.
6 Cache
Caching is the most efficient way to improve performance.
For quasi-real-time data, you can reduce the database access pressure through caching.
7 Full Text Search
For large sites, site search must not use the database like search. Like is inefficient and results in a full table scan that consumes database resources.
The use of inverted index and word segmentation technology can achieve high-speed text search.
Search functions are typically implemented using a dedicated search service program, such as the very famous SOLR.
8 Load Balancing
The load is the consumption of the computer's resources. Computer resources generally refer to CPU resources, memory resources, disk resources, network IO resources.
Share the consumption of resources to multiple computers to handle load balancing. A computer group that is connected to multiple computers is a cluster of computers.
Load balancing is also divided into hard load balancing and soft load balancing.
We often say that load balancing is generally referred to as load balancing of network IO. The specific technology is very many, Lvs,nginx, intelligent DNS and so on, can be effective for network IO load shunt.
9 Solutions for some special modes
Second kill scene
1 database Lock (not row)
2 "Two-stage Processing", which records a large number of requests submitted by users. These requests are then counted in front of the user.
3 Queue using the Redis list.
Article reading number
1 database table lock
2 "Two-stage processing", each reading of the article, records add one, using a calculation of the number of programs to count the number of articles to be read regularly.
3 using Redis's Key-value implementation.
The above special scenes in the specific environment must have a better solution.
10 Cloud Computing
It's a disruptive technology, it's an era of cloud computing, and almost everyone is talking about cloud computing. What does cloud computing really mean?
The nature of cloud computing is based on the virtual machine, when the load is large, you can quickly start some virtual machines to achieve load balancing, and when the load is small, you can discard some virtual machines to resolve resources.
The real meaning of cloud computing is to turn computing resources into a real resource that can be billed, like the tap water in the home, when needed, increase the valve, use more resources, and when not needed, close the small valve.
There is a good saying that cloud computing makes low-end network management unemployed.
------------------------------------------------------------------------------------------
The topic is too big to be expanded.
An entry-level solution for traditional high-concurrency sites