Skip to content

Difference between Application server and Web server?

Web server and application server are often used as if they meant the same thing. They do overlap, but their main jobs are different, and in a load test it helps to know which one is struggling.

A browser sends HTTP to the web server, which serves static files and routes dynamic requests to the application server, which runs business logic and talks to the databaseWho does whatbrowserHTTPWeb serverstatic files, TLS,routing, cachingdynamicApplication serverbusiness logic,transactions, poolsDB
Many modern setups blur the line, but the roles remain.

Web server

A web server speaks HTTP. It receives requests and returns responses: static files such as HTML, CSS, JavaScript and images directly, and dynamic requests passed on to something else. It typically also handles TLS, compression, caching, redirects and routing. Examples: Apache HTTP Server, Nginx, Microsoft IIS.

Application server

An application server runs the business logic. It manages things like transactions, database connection pools, security, messaging and sessions for the application code. It may receive requests over HTTP from the web server, or over other protocols. Examples: Tomcat, JBoss/WildFly, WebLogic, WebSphere, and runtimes such as Node.js or .NET's Kestrel.

The overlap

Many application servers include an HTTP listener and can serve the web directly, and many web servers can run code through modules. In containers and cloud setups, a load balancer or ingress often takes the classic web server role. Think in roles, not product names.

In a load test

LayerWatch
Web serveractive connections, worker limits, 5xx errors, request time in access logs
Application serverthread pool usage, heap and GC, connection pool waits, response time per service

If static files are fast and dynamic requests slow, look at the application server and the database behind it.

Page views