Talking about the HTTP protocol and www

1, DNS query process:

      Access client initiates -> local DNS server -> root servers -.> Com top-level domain server -> Google server -> return the results to the local server as cache -> DNS resolver to resolve to do -> Back IP addresses
      empty local DNS cache: ipconfig / flshdns
      display DNS cache: ipconfig / displaydns

2, HTTP protocol agreement

   Description: Hypertext Transfer Protocol, is the Internet's most widely used network protocol. HTTP was originally designed purpose is to provide a method to publish and accept the HTML page
     the default port for http protocol www service is 80
     encrypted https www service default port 443
     port 21: ftp
     port 22: ssh sftp
     port 25: smtp (mail a)
     port 3306: mysql database
     port 873: rsync
     port 161: snmp
     port 111: rpc
     port 3389: win left the remote
     port 80: http
     -port 443: https
     port 110: pop3
     port 53: DNS service

3, dynamic web service request process:

  Client sends a request -> to give the httpd Request -> the httpd resolution request format -> corresponding to the request parsing php -> php analysis program is finished, the result returned to the HTML httd-> httpd data back to the client
 -> contact's browser to return a result, according to the HTML interface will show up!
-------------------------------------------------- -------------------------------------------------
Summary : HTTP communication theory
   1, HTTP is an application layer protocol model osi. http protocol is an important application of www service
   2, DNS parsing principle.
   3, http request content information included.
   4, http content service returns, the message body is also the message header (header)
   5, the user returns to the flow of data through the server's browser to access the site
--------------------- -------------------------------------------------- -----------------------------

4, static pages

    The characteristics of static content: all programs in the client's browser parses
      the web design, web pure HTML format (can include images, JS, etc.) is often referred to as "static web page," Early (2001 years ago) Website It is generally produced by the static pages. Static web pages are dynamic with respect to terms, it means no background database, free program (phpjsp, net) and web pages interactive.
      It is characterized by what the programmer is compiled, what it shows is that, once the writing is completed, there will be no change. Static pages maintained and updated relatively trouble, each different pages need to be updated separately, generally applicable to update less publicity Display website (wine, pig feed, etc.). Prior to 2001 the majority is in the form of small sites to show early. .
     Extension: Common extensions corresponding to file name: htm, html, xmnl, shtmljpg (gif, png, bmp and all other
   pictures), js, css (style), swf, avi, wmnv, flv video format.
   Features:
      (1) static pages each page has a fixed URL, and the URL of the page generally common form of .htm, .html, .shtml as the suffix, and the address does not contain a question mark or "&"; "?"
      (2) through a web content to the web server, regardless of whether users access the content of each static pages are stored on the site server's file system, that is, static pages are stored on the server in real Wen
 pieces, each page is a separate file;
      content (3) static pages relatively stable. Therefore, easily indexed by search engines (advantage, SEO);,
      (4) static pages without database support, a larger workload in website design and maintenance, so when the website information Totally dependent on the amount of static pages produced great way difficult (drawback);
      interaction (5) static pages is poor, there are greater restrictions (shortcomings) in terms of functionality.
      (6) the end web application parses the user's browser, such as IE, so that a higher efficiency of program analysis, since the server does not parsed, it is possible to accept more concurrent access. When a client requests data to the server, the server directly to the data returned (without any parsing), when the client to get the data, parsing unfolded (advantage) in the browser.
                       Key *** ***
   1) client-side browser resolver, high efficiency
   2) extension format htnl, shtml, jpg, wmv (video) based format.
   3) there is no back-end database, and no user interaction.

5, dynamic pages

    动态网页是与静态网页相对应的,也就是说,网页URL的后缀不htm、.html、.shtml、.xml 等静态网页的常见后缀扩展名形式,而是以.asp,aspx,phpjsp,do.cgi.perl等形式为后缀,并 且一般在动态网页网址中经常会有标志性的符号一-“?,&”等。
    扩展名:常见扩展名为: asp,aspx.php.jsp,do.cgi.perl等。
   特点:
      (1)动态网页一般以数据库技术为基础,可以大大降低网站维护的工作量;
      (2)采用动态网页技术的网站可以实现更多的功能,如用户注册、用户登录、在线调查, 投票、用户管理、订单管理、发博文等等;
      (3)动态网页大多并不是独立存在于服务器上的网页文件,只有当用户请求时服务器才 返回一个完整的网页,
      (4)动态网页中的“?”对搜索引擎的收录存在一定的问题,搜索引擎一般不可能从一个 网站的数据库中访问全部网页,或者出于技术方面的考虑,搜索蜘蛛-般不会去抓取网址 中“?”后面的内容,因此采用动态网页的网站在进行搜索引擎推广时需要做一定的技术处 理(伪静态)才能适应搜索引擎的抓取的要求。。
      (5)程序在服务端解析,服务端如: >php引擎, java 容器(tomcat,resin, jboss,weblogic)v
        点餐>饭店做菜
      (6)由于程序在服务端解析,因此,会消耗大量的CPU和内存等资源,因此,效率不如静态网页
   动态网页小结:
      1)程序在服务器端解析,一般以数据库为基础,可以大量的和用户交互。
      2)url地址后缀一般为asp,aspx,php,jsp,do,cgi,perl
      3)架构优化:效率很差,并发也很低,尽可能转换成静态网页提供服务.

6、web架构优化方案

 
 

Guess you like

Origin www.cnblogs.com/zrxuexi/p/11391276.html