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.
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
| Layer | Watch |
|---|---|
| Web server | active connections, worker limits, 5xx errors, request time in access logs |
| Application server | thread 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.