Evolution of websites and databases (4)

Source: Internet
Author: User

Followed by the previous article 《Evolution of websites and databases (III). The last time I talked about adding servers, how many servers should I add and how to deploy a server website? The simplest way is to split an application.

I. Separating applications

Figure 1

1. Split the application and place it on different servers according to the pressure. The same is true for databases. Set different subdomain names for access. Images should be independent.

In this way, user access will be distributed to different servers. This advantage is obvious, and the pressure on websites is significantly increased. The disadvantage is that you haveProgramRe-development.

2. Multiple copies


Figure 2

2. Use Server Load balancer to distribute the pressure to different servers. In this way, you do not need to modify the program. Because the pressure is not very huge, simply use the Server Load balancer that comes with windows to display the purpose.

Some local problems can be solved through caching. However, databases can process the pressure in three ways.

1. database/table sharding
The principle is similar to the separation of applications on websites. The application-related parts are split and placed on different database servers.

2. Distributed Computing
When you hook up a database, applications also need to be split. However, when accessing the database, you only need to access the primary database. Other databases become black boxes, so you do not need to know the details of other databases.

3. Distribution
The principle is the same as that of multiple copies on the website. Data is also distributed to multiple copies to access different copies. The disadvantage is that the data will not be synchronized. It takes some time to synchronize data between database servers.

When the traffic increases, you need to purchase professional devices or develop complex applications to solve the problem. For example, bigtable, mapreduce, F5, etc. If you have never touched those things, you can stop talking about them. This seriesArticleIt is a summary of your work over the past few years, and I hope it will help you. If there is a better method, I hope I can enlighten you.

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.