Scalability: No need to change the site's hardware and software design, simply by changing the number of servers deployed to expand or reduce the system's service processing capacity.
The most important technical means is the server cluster, the number of servers to be added to the cluster and the processing capacity of the cluster linear relationship.
First, the design of flexibility
1, different functions of physical separation to achieve scaling: database separation, cache separation, static resource separation
- Vertical separation: Database, basic technical services, reusable business services, website specific products
- Horizontal separation: The separation of the various business modules, the horizontal separation of the force can be very small, or even a critical page to deploy a separate service, such as the e-commerce website is very important Product Details page, shop page, search list page.
2, single function through the scale of the cluster to achieve scaling: team combat, avoid individual heroism.
Second, the scalability design of Application server cluster
1. HTTP redirect Load balancer (no longer used)
2. DNS domain name resolution load Balancer
3. Reverse Proxy load Balancing
4. IP load Balancing
5, Data link layer load balancing (also known as triangular mode, or Dr mode)
6. Load Balancing algorithm
(1), polling (Round Robin RR)
(2), weighted polling (Weighted Round Robin WRR)
(3), stochastic (random)
(4), Minimum link (Least Connections)
(5), Source address hash (IP Hashing)
Third, the scalability design of distributed cache cluster
Four, data storage server cluster scalability design
1, the scalability of the relational database cluster design: Database reading and writing separation, data sub-library (different business tables in different libraries, can not do join), data shards (the same table data in different databases)
- Maxscale is the marriadb of the official middleware, the domestic mycat
- Application---> Database middleware--->mysql
Study Note 7: "The Core principles and case analysis of large web site technology architecture": The Scalability of the website "Hae"