Large Web Architecture (2) historical evolution (next)

Source: Internet
Author: User
Tags data structures split system log

This article was originally prepared to write a few days ago, who also did not think this time the company's RC too much, including sour forced overtime, overtime ... So in a larger company to work, write code of responsibility must be strong, perhaps because of some of your small bugs, to bring a lot of losses to the company ... This is really not a big experience in the previous company.

Well, go ahead and talk about the evolution of the architecture, as you can see from the fourth generation architecture, we can better solve the application layer's load balancing in the entire architecture to make the application layer no longer a bottleneck, through A10, we can make the user's access request distributed to any server in the cluster, When the volume of traffic continues to expand, we can continue to increase the server in the cluster to solve the load pressure, to achieve the system scalability, now our business scale like a snowball growing, the number of users increased violently ... At this time we cache more and more data, although we use the cache, but a large number of "cache expiration Reread" and "cache misses", resulting in very large database pressure, this time the pressure of the database has become a bottleneck in our architecture.

V: Fifth generation architecture

Now that the database has become the bottleneck of our fourth generation architecture, we must resolve the pressure problem of the database, the most common practice is "read and write separation", the write and read libraries are split to ease the pressure of the database.

Now we do a number of libraries, write the time into the main library, then the database is distributed to the library, and then the application is read from the library, and here in order to make the database more transparent to the application, we usually add a "data access layer", in the Ctrip is the Enterprise Library on a layer of encapsulation and security using all in One mode, you can see that the fifth generation architecture has greatly alleviated the pressure of the database.

After several months of business development, we will find that the database retrieval more and more slowly, single table data volume has almost exploded ... Has seriously affected system performance, users complain constantly, this time "data retrieval" has become a serious bottleneck in our system.

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/web/Skills/

VI: Sixth generation architecture

Now that the search is a bottleneck, we have to split the database to minimize the amount of data in the search and optimize the algorithm as much as possible.

1: Business Sub-Library

Instead of coupling them to a single database, we allocate different businesses to different business servers, thus creating a database cluster and diverting the pressure of the application tier to the database.

2: Sub-table

You can use the time division, three months after the data into the history table, the current table only save three months of data, and from a great supply of single table retrieval capabilities.

3: Adopt NoSQL

NoSQL is for the web and life, participle, system log, and so on, like many NoSQL, and NoSQL has its innate load balance.

4: Optimization algorithm

Stacks, queues, binary trees, hashes, and so on. Transformations and non-transformation data structures can be flexibly used in this large data scenario, which is also a reference standard for distinguishing between senior programmers and lower-code farmers.

When your architecture is at this level, the number of people in the company is too high, at this time our business will be divided into a lot of product lines, such as: Air Ticket Division, Hotel Division, Tourism Business Department, the Community Division, each division will only be responsible for their own product structure, so that our structure again subdivided, From a technical point of view, these departments can also be extracted from the public sector, such as login module, order Processing, such as the reusable modules, you can set up a public platform and the framework of the Department of Architecture, when

This architecture continues to develop, then there are all kinds of cloud, also become a variety of tools to change money, such as the current blog Park hosted on the Aliyun ...

Finally, today, the end of the high-level attention to the IVR project of all things, and finally a memorial, since the pig to get those so-called data, leading to our continuous overtime day and night.

Author: cnblogs Line code Agriculture

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.