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:54 12472browse

one.http wwwPort:

httpProtocolwwwThe default port of the service is:80

Encryptedwwwservice,httpDefault port:443(online banking, when paying)

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

Step 1: The client user enters thewww.baidu.comwebsite address from the browser and presses Enter, the system will query the localhostfile andDNScache information to find whether there is aIPresolution record corresponding to the URL. If there is, get theIPaddress directly, and then access the website. Generally, the first time you request it, theDNScache will not have a resolution record. of.

Step 2: If the client does not haveDNScache orhostsdoes not correspond The domain name resolution record of thewww.baidu.comwebsite address, then the system will hand over the browser’s resolution request to theDNS set locally on the client.Server address resolution (thisDNSisLDNS, that is,local dns), if the local cache of theLNDSserver has a corresponding parsing record, theIPaddress will be returned directly; if No,LDNSwill be responsible for continuing to request otherDNSservers.

The third step:LDNSwill get the "from theDNSsystem.”The root starts to requestwww.baidu.comdomain name resolution, after a series of searches at various levelsDNSThe server will eventually find the authorizationDNSserver corresponding to thewwwl.baidu.comdomain name, and this authorizationDNSserver is the server used to manage domain name resolution when an enterprise purchases a domain name. This server haswww.baidu.comcorrespondingIPresolution record. If there is none at this time, it means the operation and maintenance of the enterprise The personnel did not resolve thewww.baidu.comdomain name.

Step 4:www.baidu.comThe authorization corresponding to the domain nameDNSThe server willwww.baidu.comThe corresponding finalIPresolution record is sent toLDNS

Step 5:LDNSReceive authorization fromDNSserver aboutwww.baidu.comThe correspondingIPresolution record is sent to the client browser, and the domain name andare stored locally inLDNSIPThe 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 correspondingIPaddress ofwww.baidu.com, and then the browser will request to obtain theIPThe address corresponds to thewebserver. Thewebserver 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 pureHTMLformat 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 early2001.

A.

Each page of a static web page has a fixedURL, and the web pageURLis usually Common forms such as.htm/.html/.shtmlare 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 users2) Dynamic web page

Relative to static web pages, that is to say, the suffix of web pageURLis 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:phpengine,javacontainer

F.Since the program is parsed on the server side, Therefore, it will consume a lot ofCPUand 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 URLsuffix is generallyasp/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 about1-2hours 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 differentIPaddresses access the network is an important indicator for website traffic analysis.0000-2400Same as## The #IPaddress is calculated once. The number of independentIPis 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 ofPVis to issue a request from the browser to the networkwebserver (Request), after the network server receives this request, it will send a web page corresponding to the request (page) to the browser, thereby generating aPV. 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 as1PV, but to prevent users from brushingPV, many websites put the statistical program ofPVon the page the bottom.PVreflects the number of pages viewed on a website, so each refresh counts. That is to say,PVis directly proportional to the number of visitors, butPVis 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 within00will only be Calculate once.UVMetric:1.Web server resolution2.UsecookieDistinguish

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