Home  >  Article  >  Operation and Maintenance  >  Detailed introduction to http and www services

Detailed introduction to http and www services

PHP中文网
PHP中文网Original
2017-06-21 11:15:5412555browse

one. http wwwPort:

httpProtocolwwwThe default port of the service is: 80

Encrypted www service, httpDefault port: 443 (online banking, when paying)

2. The basic process for users to access the website:

Step 1: The client user enters the www.baidu.com website address from the browser and presses Enter, the system will query the local host file and DNS cache information to find whether there is a IP resolution record corresponding to the URL. If there is, get the IP address directly, and then access the website. Generally, the first time you request it, the DNS cache will not have a resolution record. of.

Step 2: If the client does not have DNS cache or hosts does not correspond The domain name resolution record of the www.baidu.com website address, then the system will hand over the browser’s resolution request to the DNS set locally on the client. Server address resolution (this DNS is LDNS, that is, local dns), if the local cache of the LNDS server has a corresponding parsing record, the IP address will be returned directly; if No, LDNS will be responsible for continuing to request other DNS servers.

The third step: LDNS will get the " from the DNS system .”The root starts to request www.baidu.comdomain name resolution, after a series of searches at various levelsDNSThe server will eventually find the authorization DNS server corresponding to the wwwl.baidu.com domain name, and this authorizationDNS server is the server used to manage domain name resolution when an enterprise purchases a domain name. This server has www.baidu.com corresponding IP resolution record. If there is none at this time, it means the operation and maintenance of the enterprise The personnel did not resolve the www.baidu.com domain name.

Step 4: www.baidu.comThe authorization corresponding to the domain nameDNSThe server will www.baidu.comThe corresponding final IP resolution record is sent to LDNS

Step 5:LDNSReceive authorization from DNSserver aboutwww.baidu.comThe corresponding IP resolution record is sent to the client browser, and the domain name and are stored locally in LDNS IPThe corresponding resolution is cached so that the same resolution request record can be returned faster next time

Step 6: Client The client browser obtains the corresponding IP address of www.baidu.com, and then the browser will request to obtain the IP The address corresponds to the web server. The web server receives the customer's request and responds to the request, and returns the content requested by the customer. Give the client browser

## three. Dynamic web pages, static web pages, pseudo-static web pages

1) Static web pages

In the design of web pages, web pages in pure HTML format are usually called " Static pages". Early websites were generally made from static web pages. Compared with dynamic web pages, static web pages refer to databases without background and do not contain data and interactive web pages.

Features: What you edit will be displayed. Once the edit is completed, there will be no changes. The maintenance and update of static web pages is relatively troublesome. Each different web page needs to be updated separately. It is generally used for promotional websites with fewer updates. It is the form displayed by most small and medium-sized websites in the early 2001.

A.

Each page of a static web page has a fixed URL, and the web page URL is usually Common forms such as .htm/.html/.shtml are suffixes, and the address does not contain question marks

B. Once the web page content is published to the website server On the Internet, regardless of whether there is a user access, the content of each static web page can be saved on the website server file system. In other words, the static web page is a file actually saved on the server, and each web page is an independent file.

C.

Static web pages are stable and therefore easy to be indexed by search engines (advantages, seo)

D. Static web pages do not have a database The support requires a lot of work in website production and maintenance. Therefore, when the website has a large amount of information, it is more difficult to rely entirely on static web page production (disadvantages)

E. The interactivity of static websites is poor. There are huge limitations (disadvantages) in functionality The client does not parse, so it can accept more concurrent accesses. When the client requests data from the server, the server returns the data directly (without any analysis). When the client gets the data, it is parsed and displayed on the browser side (advantages)

Key points: 1. Client browser parsing program, very efficient2.

Extension format

html/shtml/jpg/wmv

Format

3. The backend has no database and no interaction with users 2) Dynamic web page

Relative to static web pages, that is to say, the suffix of web page URL is not .html/.htm/shtml/.xml, etc. Common suffix extension form for static web pages. Instead, it is suffixed in the form of .asp/.aspx/.php/.jsp/do/cgi/perl, and generally there are iconic symbols in dynamic web URLs. --”?&etc

Features:

A. Dynamic web pages are generally based on database technology, which can greatly reduce the cost of the website. Maintenance workload

B. Websites using dynamic web technology can implement more functions, such as user registration, user login, online surveys, voting, user management, order management, Weibo, etc.

C. Most dynamic web pages are not web files that exist independently on the server. The server returns a complete page only when the user requests it.

D. in dynamic web pages "? "There are certain problems with the inclusion of search engines. It is generally impossible for search engines to access all web pages from the database of a website, or due to technical considerations, search spiders generally will not crawl the URLs"? "The following content, therefore, websites that use dynamic web pages need to do certain technical processing (pseudo-static) when promoting search engines to adapt to the requirements of search engines.

E. The program is serving Side parsing, server side: php engine, javacontainer

F.Since the program is parsed on the server side, Therefore, it will consume a lot of CPU and memory resources, etc. Therefore, the efficiency is not as good as that of static web pages

Summary:

1. The program is parsed on the server side, Therefore, it consumes a lot of resources and is therefore not as efficient as a static web page

2. The URL suffix is ​​generally asp/aspx/php/jsp/do/cgi/perl.

3. Architecture optimization: poor efficiency, low development, may be converted into static web pages to provide services

3) Pseudo-static web pages (the most important)

Disguise dynamic as static. Because search engines cannot correctly read dynamic web content with parameters, many pages with rich information cannot be included by search engines. The main purpose of using pseudo-static is to facilitate search engine inclusion. And improve user experience. Disguising dynamic as static does not improve the performance of the website. On the contrary, it will reduce the performance of the website. Now many large websites will use the technology of dynamic web pages to generate static web pages to eliminate the parameters in dynamic web pages and make them more indexable by search engines. More content can achieve the effect of optimizing the website. Generating static web pages can indeed solve the problem of search engine inclusion and improve the access performance of the website. Summary:

1. .Dynamic web pages are disguised as static web pages

2.Purpose: to facilitate search engine inclusion, improve user access and user experience

3.Because it is just a disguise, it is actually dynamic, and the performance has not been improved. On the contrary, it decreases

4.

Convert it to a real static interface as much as possible, unless the amount of concurrency is not very large, use

rewrite

to achieve disguised state

4. Web

Architecture Optimization Plan

Since static programs are parsed on the client, the server speed is greatly reduced pressure, so the parsing efficiency is higher. In the actual high-concurrency website architecture, we can consider parsing the data requested by the user and storing it as a static file on the hard disk or in memory to reduce the pressure on the dynamic server, thereby improving User experience. For information on the conversion of high-concurrency website architecture from dynamic to static, please refer to Baidu

##Examples of high-concurrency website architecture from dynamic to static:

1. Portal news business (once published, almost no changes are needed)

The static conversion of news business is relatively simple, and is done by the editors When publishing news, you can generate static files, then synchronize the static content to all server sites across the country, and then provide users with access

2. Video business (once the upload and release is completed, almost No changes required)

Youku video website, users upload videos, which need to go through the review- transcoding process, which takes about 1-2 hours to review -Transcoding-Push.

five. IPPVUV

1)IP-internet Protocol:

IP (

INDEPENDENT

IP), that is, Internet protocol, refers to independentIPnumber. The total number of times computers with different IP addresses access the network is an important indicator for website traffic analysis. 0000-2400 Same as ## The #IP address is calculated once. The number of independent IP is not standardized and is only an approximate number.

2)PV-Page View

PV

Visits: That is,

page view, the Chinese translation is page views, that is, page views or clicks, and it is calculated once every time the user refreshes. The specific measurement method of PV is to issue a request from the browser to the network web server (Request), after the network server receives this request, it will send a web page corresponding to the request (page) to the browser, thereby generating a PV. So as long as the request to open is sent to the browser, regardless of whether the page is fully opened (download completed), it should be recorded as 1PV, but to prevent users from brushing PV, many websites put the statistical program of PV on the page the bottom. PV reflects the number of pages viewed on a website, so each refresh counts. That is to say, PV is directly proportional to the number of visitors, but PV is not the number of visitors to the page, but the number of visits to the website Number of pages. 3) UV-Unique Visitor:

UV

(Independent visitor): A computer customer who visits the website end as a visitor.

0000-24:The same client within 00 will only be Calculate once. UVMetric:1.Web server resolution2.Use cookieDistinguish

The above is the detailed content of Detailed introduction to http and www services. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn