[정보처리기사/소프트웨어개발환경] Web Server vs. Web Application Server
What Is a Web Server?
A web server is a computer that hosts web pages, making them accessible online. When a user loads a site, the web server will retrieve the relevant files and send them to the browser so the user can interact with them.
In this structure, one program 〰️ the client 〰️ requests a resource or service from another program 〰️ the server.
Web servers user HTTP(Hypertext Transfer Protocol) when resoonding to user requests via the Word Wide Wep. HTTP is a protocol used to exchange information between computers.
Through the HTTP request process, servers can deliver the site's HTML document to the user's web browser, like Google Chrome.
Example of Web Servers
- Apache HTTP Server
- Microsoft Internet Information Service
- Google Web Server
Overview of the whole process
1. When someone wants to load a website, the brower will look for the web server hosting the site's files.
2. To achieve this, the web browser translates the site's domain name into an IP address via the DNS(Domain Name System). If the site is frequently visited, the web browser will search through its file cache.
3. After finding the corresponding web server, the browser sends on HTTP request to retrieve site content.
4. The web server receives and processes the HTTP request through its HTTP server. Once the HTTP server accepts the request, it will through the database to obtain the relevant data.
5. Finally, the server returns the files to the web browser and delivers them to user.
When the HTTP server fails to find or process the requested files, it will send on HTTP error status code to the browser.
The most common error message is a 404 error, which means the requested page is missing.
Meanwhile, a 403 error may appear if there are permission issues.
Furthermore, if a webserver fails to receive a timely response from another server acting as a proxy or gateway, a 504 error occurs.
What Is a WAS; Web Application Server?
An application server extends the capabilities of a web server by supporting dynamic content generation, application logic, and integration with various resources.
It provides a runtime envirionment where you can run application code and interact with other software components, like messaging systems and databases. It uses business login to transform data more meaningfully than a web server.
Summary of diffenences: web server vs. web application server
Web server | Application server | |
Tasks covered | Web servers deliver responses to simple requests. | An application server delivers more complex content from databases, services, and enterprise systems. |
Protocols used | Web servers primarily use HTTP. They also support FTP and SMTP. | Application servers support many protocols. |
Content types | Web servers deliver static content, like HTML pages, images, videos, and files. | Application servers deliver dynamic content, like real-time updates, personalized information, and customer support. |
Multithreading | Does not typically use multithreading. | Uses multithreading to process requests concurrently. |
Reference 🙇🏻♀️
https://www.hostinger.com/tutorials/what-is-a-web-server
https://aws.amazon.com/compare/the-difference-between-web-server-and-application-server/?nc1=h_ls