码迷,mamicode.com
首页 > Web开发 > 详细

Web 服务器与应用服务器的区别是什么?

时间:2017-12-14 23:53:54      阅读:248      评论:0      收藏:0      [点我收藏+]

标签:pool   其他   component   授权   应用   识别   app   服务   cat   

不太严谨的说法:
web服务器就是负责接收用户的Request,然后响应html等给客户浏览器。
应用服务器处理一些业务逻辑等。

 

作者:luo
链接:https://www.zhihu.com/question/20096067/answer/226652400
来源:知乎
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

Most of the times these terms Web Server and Application server are used interchangeably.

在大多数时候,Web服务器和引用服务器这两个术语是可以互换使用的。

Following are some of the key differences in features of Web Server and Application Server:

以下是Web服务器和应用服务器在特性上的一些关键的差异:

  • Web Server is designed to serve HTTP Content. App Server can also serve HTTP Content but is not limited to just HTTP. It can be provided other protocol support such as RMI/RPC. Web服务器的设计目的是提供HTTP内容,应用服务器也可以提供HTTP内容,但不限于HTTP,它还可以提供其他协议支持,如RMI / RPC。
  • Web Server is mostly designed to serve static content, though most Web Servers have plugins to support scripting languages like Perl, PHP, ASP, JSP etc. through which these servers can generate dynamic HTTP content. Web服务器主要是为提供静态内容而设计的,不过大多数Web服务器都有插件来支持脚本语言,比如Perl、PHP、ASP、JSP等,通过这些插件,这些服务器就可以生成动态的HTTP内容。
  • Most of the application servers have Web Server as integral part of them, that means App Server can do whatever Web Server is capable of. Additionally App Server have components and features to support Application level services such as Connection Pooling, Object Pooling, Transaction Support, Messaging services etc. 大多数应用服务器都将Web服务器作为其不可分割的一部分,这意味着应用服务器可以做任何Web服务器所能做的事情。此外,应用服务器有组件和特性来支持应用级服务,如连接池、对象池、事务支持、消息传递服务等。
  • As web servers are well suited for static content and app servers for dynamic content, most of the production environments have web server acting as reverse proxy to app server. That means while servicing a page request, static contents (such as images/Static HTML) are served by web server that interprets the request. Using some kind of filtering technique (mostly extension of requested resource) web server identifies dynamic content request and transparently forwards to app server. 由于web服务器非常适合用于提供静态内容,而应用服务器适合提供动态内容,因此大多数生产环境都有web服务器充当应用服务器的反向代理。这意味着在页面请求时,web服务器会通过提供静态内容(例如图像/静态HTML)来解释请求,并且它还会使用某种过滤技术(主要是请求资源的扩展)识别动态内容请求,并透明地转发到应用服务器。

Example of such configuration is Apache Tomcat HTTP Server and Oracle (formerly BEA) WebLogic Server. Apache Tomcat HTTP Server is Web Server and Oracle WebLogic is Application Server.

In some cases the servers are tightly integrated such as IIS and .NET Runtime. IIS is web server. When equipped with .NET runtime environment, IIS is capable of providing application services.

 

———————————————————————————————————————————

Quote and translate from Stack Overflow

Web 服务器与应用服务器的区别是什么?

标签:pool   其他   component   授权   应用   识别   app   服务   cat   

原文地址:http://www.cnblogs.com/feng9exe/p/8040379.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!