The so-called structure, a popular saying is "the highest level of planning, difficult to change the decision," these plans and decisions laid the future direction of things and the final blueprint.
The software architecture is "the abstract description of the whole structure and components of software, which is used to guide the design of large software systems". Generally speaking, software architecture needs to focus on the 5 architectural elements of performance, availability, scalability, extensibility, and security.
1, Performance
Performance is an important aspect of Web site architecture design, and any software architecture design plan must consider the possible performance issues. And because performance problems are almost everywhere, there are also a lot of ways to optimize Web performance:
Browser-side: Through browser caching, page compression transmission, reasonable layout of the page, reduce the transmission of cookies and other means, even the use of CDN acceleration function.
Application Server-side: can use the server local cache and distributed caching, can also be asynchronous operation to speed up the response, in the case of high concurrent requests, multiple application servers can be composed of a cluster of common external services, improve the overall processing capacity, improve performance.
Database server side: You can use indexes, caching, SQL performance optimization, and so on, and use the NoSQL database to optimize the data model, storage structure, and so on.
Measuring the performance of the site has a series of indicators, the important response time, TPS, performance counters, etc., through these indicators to determine whether the system design to achieve the goal.
2, Availability
Availability is the time to provide uninterrupted service. Almost all sites are committed to 7x24-hour availability, but in fact no site can achieve full 7x24, there will always be some downtime, minus these downtime, is the site's available time. Some large Web sites can achieve 4 more than 9 availability, that is, 99.99%.
Web site is the main means of high availability of redundancy, application deployment on multiple servers at the same time providing services, data storage on multiple servers to each other, any one server will not affect the overall application can, the common means of implementation is to multiple servers through the load balancing equipment to form a cluster.
Measuring whether a system architecture is designed to meet the high availability goal is to assume that any one or more servers in the system are down and that the overall system is still available when there are various unexpected problems.
3, Telescopic
Large Web sites need to face a large number of users of high concurrency access and storage of massive data, the site through the cluster of multiple servers to form a whole together to provide services. The so-called scalability refers to the continuous access to the cluster of servers to alleviate the overall public users of the concurrency and the increasing demand for data storage.
The main criteria for measuring the scalability of the architecture are the availability of multiple servers to build clusters and the ease of adding new servers to the cluster. Whether you can provide services that are not differentiated from the original server after you join a new server. Whether there is a limit to the number of total servers that can be accommodated in the cluster.
4, extensibility
Unlike other architectural elements that focus on non-functional requirements, the Web site's extensibility architecture directly focuses on the functional requirements of the site. The rapid development of the website, the expansion of the function, how to design the structure of the website so that it can quickly respond to demand changes, is the main goal of the Web site scalable architecture.
The main criterion for measuring the scalability of Web site architecture is to add new business products to the Web site, whether it can realize the transparency of existing products without influence, whether there is little coupling between different products.
The main means of Web site extensible architecture is event-driven architecture and distributed services.
Event drivers typically use Message Queuing implementations, separating message production from processing logic in this way.
The server service separates the business from the reusable service and invokes it through the Distributed service framework. New additions can be used to implement their own business logic by invoking reusable services without any impact on existing products.
5, Security
The internet is developed, and anyone can access the site anywhere. Web site security architecture is to protect the site from malicious access and attacks, protect the site's important data is not stolen.
The standard of Web site security architecture is to deal with the existing and potential attacks and cyber means, whether there is a reliable response strategy.
Original link: http://blog.csdn.net/chaofanwei/article/details/27046795