what is difference between web server and application server
I always get confused in web server 开发者_如何学Pythonand application server. can somebody tell me what is exactly difference between these two.
In practice, there is little difference and most people use the term interchangeably.
The subtle difference to me is:
A web server serves web pages and static content. Not dynamic content.
An application server can be a web server (with dynamic content), though it might not be at all. It offers an API for programmers.
As usual, wikipedia has the best definitions.
Web server:
the computer application that helps to deliver content that can be accessed through the internet.
Application server:
An application server is a software framework dedicated to the efficient execution of procedures (programs, routines, scripts) for supporting the construction of applications.
...
An application server acts as a set of components accessible to the software developer through an API defined by the platform itself.
An application server is any server on any application-level protocol.
HTTP is an application-level protocol, so a web-server is an application-server. An application-server could also use a completely different protocol.
However, a web server is only likely to be called an application server if it is said to run "web applications", which generally means "dynamic" content of a certain (arbitrary) degree of complexity. This is technically nonsense since all HTTP is on the application level (and to the outside a black box, so whether its served from "static" content or "dynamic" content is irrelevant).
Still, the distinction is made partly because some people still treat HTTP as if it were some sort of transport protocol and expect there to be applications "on top", but mostly to allow marketing people to hint that there is some sort of meaningful distinction being made and you should invest in their "application servers" instead of a web-server.
Basically a server is only the task a computer is performing. Server is not the name of the machine (though it's common to call it server). So a machine can work as web server, application server and so on.
A web server means the server is delivering web-content (HTML, PHP and so on). Typical server software is Apache or IIS.
An application server is a more general term. Per definition a web server is an application server, too (the Apache software is an application). But an application server is not limited to delivering web content.
I hope it's not too confusing ;-)
"Web server" implies HTTP (and most likely HTML); "application server" could be any protocol.
Not even this distinction is 100%, and beyond that difference lies flamewar territory and arguing over semantics.
If your question comes from the Java domain, an application server is a fully conformant server to J2EE specification, providing all related features (e.g. Glassfish, JBoss, WebLogic)
A web server on the other hand is just light-weight server not fully implementing the J2EE specs (e.g. Apache Tomcat)
Web servers:
- Apache, IIS, nginx, Lighttpd, etc.
They CAN generate dynamic contents by INTERFACING with an application like a CGI back-end, PHP, .Net, Lua, etc. via CGI, FastCGI, SCGI, modules, etc.
Web Application servers:
- Tomcat/JBoss/GlassFish/WebSphere (Java scripts), G-WAN (ANSI C scripts), etc.
They NATIVELY generate dynamic contents by using an INTEGRATED scripting engine like Java or C scripts in the examples above.
Application Servers are usually faster because they DON'T HAVE to suffer the overhead of the INTERFACE between the server and the scripting engine.
精彩评论