Large Web site Architecture series: E-commerce website Architecture case (3)

Source: Internet
Author: User

This article is the e-commerce website Structure of the third case, the main introduction of the database cluster, read and write separation, sub-Library sub-table, service, the use of Message Queuing, and the e-commerce case of the structure of the summary.

6.5 db cluster (read/write separation, sub-database sub-table)

Large-scale Web sites need to store massive amounts of data, to achieve massive data storage, high availability, high performance is generally used in a redundant way of system design. There are generally two ways to read and write separation and sub-database tables.

Read/write Separation: General solution read scale is much larger than the write ratio of the scene, you can use a master one, a master multi-standby or multi-master multi-Standby mode.

This case is based on business splitting, combining the sub-database and read-write separation. Such as:

(1) After the business split: each subsystem needs a separate library;

(2) If the separate library is too large, according to business characteristics, can be re-divided into libraries, such as commodity classification database, product library;

(3) After the library, if the table has a large amount of data, then the table, the general can be in accordance with the ID, time and other sub-table; (Advanced usage is consistent hash)

(4) to separate the reading and writing on the basis of the sub-database and the table;

Related middleware can refer to Cobar (Ali, is not currently maintained), Tddl (Ali), Atlas (Qihoo), Mycat (on the basis of Cobar, many domestic cattle, known as the first open source projects).

The problem of the sequence after the sub-list, JOIN, transaction issues, will be in the sub-database sub-table topic sharing, introduced.

6.6 Service

The functions/modules that are common to multiple subsystems are extracted and used as public services. For example, the member subsystem of this case can be extracted as a common service.

6.7 Message Queuing

Message Queuing can solve the coupling between subsystems/modules, and implement asynchronous, high-availability, high-performance systems. is a standard configuration for distributed systems. In this case, Message Queuing is mainly used in the shopping, distribution links.

(1) After the user orders, write to the message queue, and then return directly to the client;

(2) Inventory subsystem: Read Message queue information, complete the reduction of inventory;

(3) Distribution subsystem: Read Message queue information, for distribution;

Currently more MQ is active Mq,rabbit Mq,zero mq,ms MQ, etc., and needs to be selected according to the specific business scenario. It is recommended to study the next rabbit MQ.

6.8 Other Architectures (technology)

In addition to the above introduction of business split, application cluster, multilevel cache, single sign-on, DB cluster, service, Message Queuing outside. There are CDN, reverse proxy, Distributed File system, big Data processing system.

Here is not detailed introduction, we can ask Niang/google, have the opportunity to share to everyone.

VII. Structure Summary

The above is a summary of the structure of this share, with details of which can be found in the previously shared content. There are many areas that can be optimized and refined, because it is a case-sharing, mainly for the important part of the introduction, the work requires you to be based on the specific business scenarios for the architecture design.

The above is the e-commerce website Architecture case sharing a total of three, from the e-commerce website needs, to the single-machine architecture, gradually evolved into a common, reference to the distributed architecture of the prototype. In addition to functional requirements, there are certain high-performance, high-availability, scalable, scalable and other non-functional quality requirements (architectural objectives).

This blog will introduce a series of articles on load balancing, business splitting, cluster architecture, read and write separation, sub-database sub-tables, service, Message Queuing and other common technologies and architectures. Welcome the small friends to onlookers.

Reference:

Http://www.cnblogs.com/itfly8/p/5009005.html

Large Web site Architecture series: E-commerce website Architecture case (3)

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.