"Large Web site Technology Architecture" Reading Notes III: Large-scale website core architecture elements

Source: Internet
Author: User
Tags message queue browser cache

First, performance-response time determines the user

(1) Browser side:

① browser cache;

② using page compression;

Ps:gzip compression efficiency is very high, usually can reach the 70% compression ratio, that is, if your Web page has 30K, after compression becomes about 9K. To enable gzip compression to improve browsing speed, you can browse this article: http://www.chinaz.com/web/2012/1017/278682.shtml

③ reasonable layout page;

CSS: put stylesheets on top , avoid using CSS expressions (expression_r), use external JavaScript and CSS, cut JavaScript and CSS, <link> Replace @import; avoid using filters;

  javascript: Place scripts at the bottom of the page , use external JavaScript and CSS, cut JavaScript and CSS, eliminate duplicate scripts, reduce DOM access , and develop intelligent event handlers;

④ reduce cookie transmission;

(2) CDN: Content distribution Network (Delivery, CDN) will accelerate the content distribution to the nearest user node, shorten the user's viewing object delay, improve the response speed of users to visit the site and the availability of the site, to solve the network bandwidth is small, user access is large, Dot distribution is not equal problem. For details, please see Baidu Encyclopedia: http://baike.baidu.com/view/8689800.htm?from_id=420951&type=search&fromtitle=CDN&fr= Aladdin

(3) Application Server-side: Server local cache and distributed cache;

memcached Introduction: http://baike.baidu.com/view/794242.htm

About Redis: http://baike.baidu.com/view/4595959.htm

(4) Server cluster technology: Web server cluster, database server cluster, distributed cache server cluster, etc., through the deployment of multiple servers to provide similar services, improve the overall processing capacity.

(5) database server side:

① Index: Index is a structure that sorts the values of one or more columns in a database table (for example, the last Name column of the employee table). If you want to find him or her by the name of a particular employee, the index helps you get information faster than searching all the rows in the table.

PS: It is important to note that building too many indexes will affect the speed of updates and insertions because it requires the same update for each index file.

② cache: The database cache is between the application and the physical data source, and it is designed to reduce the frequency of application access to the database's physical data source, thus improving the performance of the application.

③sql optimization: When a database-based application is running slowly, 90% of the time may be due to problems with the data-access program, either without optimizations or by not writing the code in the best way, so you need to review and optimize your data access/handlers. Specifically, you can browse this article: http://www.cnblogs.com/Shaina/archive/2012/04/22/2464576.html

④nosql: The burgeoning NoSQL database is becoming more and more advantageous in performance by optimizing data model, storage structure, scalability and other means.

Second, availability-can you guarantee a few 9?

(1) How to measure availability? Backed by 9来: Almost all sites promise to be available for up to half an hour, but in fact they are not fully realized and there are always some downtime. Then, removing these downtime is the total available time for the site. The usability metrics of the site to measure the usability of the site, such as the availability of some well-known sites to 99.99%.

(2) What are the means of improving usability?

① Core: redundancy -Each server backup to ensure the overall availability;

② Application Server-side: Cluster with load balancing devices, where one outage immediately switches to another server to continue serving, guaranteeing high availability.

③ Storage Server-side: Requires real-time backup of data, when one outage immediately translates data access requests to other servers and recovers data to ensure high data availability.

Three, flexibility-flexible fang is a man

(1) Measurement criteria:

① can I build a cluster on a polymorphic server?

② is it easy to add new servers to the cluster?

③ can I provide a non-discriminatory service after joining the server?

(2) Main means:

① Application Server: Using the appropriate load balancing device (hardware or software?) F5 or lvs+keepalived);

② Cache server: Improved cache routing algorithm to ensure the accessibility of cached data;

③ database server: A cluster of multiple servers is formed by means of routing differentiation;

Iv. Extensibility-A new business is on the line

(1) Measurement criteria: Is it possible to achieve transparency without impact on existing products when new business is added (does it need to be modified to match existing business?) );

(2) Main means:

① Event-Driven architecture: Using message Queue implementation;

② Distributed services: separating business and reusable services;

V. Security-Mommy doesn't have to worry about my photos anymore.

(1) What is safety? Protect the site from malicious access and attacks, protect the site's important data is not stolen;

(2) Measurement criteria: whether there is a reliable coping strategy against the existing and potential attack spy means;

Mind Map of this chapter

Zhou Xurong

Source: http://www.cnblogs.com/edisonchou/

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.