Neither term is rigorously defined, as far as I know. So crisply defining
"the difference" between these two fuzzy terms is difficult.
I'd say the difference is one of degree, where the app server is typically a
superset of the web server.
My take:
- a Web server serves web requests. Originally this meant HTTP requests
(GETs) for static HTML pages with links to other pages, but the concept
qiuckly evolved to include dynamically-generated data-driven web pages.
- an application server serves requests for application function. Often the
requests arrive in the form of HTTP GET's from web browsers, but not always.
The application can connect to databases, queues, back end systems, and can
utilize facilities like transactions, access control, threading, logging
and auditing, asychrony, queueing, and so on.