2024. 8. 13. 17:58ㆍ■ SPRING LECTURES/BEGINNER
1. Web Server
Analogy: 🧱 A web server is like a display case for LEGO bricks. The display case arranges and showcases the bricks for customers to see but doesn’t assemble or alter them. When a customer (client) requests a specific brick, the display case retrieves it from another area and provides it to the customer.
Explanation: 🌐 A Web Server is a server that handles HTTP requests and delivers web pages to clients. It accepts requests when a client enters a URL/URI into a browser and provides static content like HTML documents. HTML is a pre-written document that contains static information which doesn’t change dynamically. The web server does not create the content itself; instead, it retrieves the content from another system (web application server) if needed and delivers it to the client.
2. Web Application Server (WAS)
Analogy: 🧱 A web application server is like a workbench for assembling LEGO bricks. The workbench takes the requested bricks and assembles them into a complete structure according to the customer’s needs. It handles the detailed assembly tasks and combines the bricks as requested.
Explanation: 🌐 A Web Application Server (WAS) is a server that handles and generates dynamic content based on HTTP requests. It processes client requests, executes complex business logic, and dynamically generates data. This server often interacts with databases or processes user inputs to produce results. Unlike a web server, a web application server handles server-side logic and delivers the processed results to the client via the web server.
Summary:
- Web Server: Acts like a display case for LEGO bricks, receiving client requests and providing static content or forwarding requests to other systems (web application servers).
- Web Application Server: Acts like a workbench for assembling LEGO bricks, processing client requests to generate dynamic content and delivering it to clients via the web server.
Examples:
- Web Server: Apache, Nginx, etc., are web servers that handle client requests and serve web pages.
- Web Application Server: Spring, Django, Laravel, etc., are web application servers that handle client requests, process dynamic data, and deliver it to clients through the web server.
Note:
- Apache Tomcat: Combines the functionalities of a web server and a web application server, performing both roles. Tomcat provides static content and generates dynamic content as needed.
1. 웹서버 (Web Server)
비유: 🧱 웹서버는 레고 블록을 전시하는 진열대와 같음. 진열대는 고객이 볼 수 있도록 블록들을 정렬하고 보여주지만, 블록들을 조립하거나 변경하지는 않음. 고객(클라이언트)이 블록을 요청하면, 진열대는 요청된 블록을 다른 공간에서 가져와서 고객에게 제공함.
설명: 🌐 **웹서버(Web Server)**는 HTTP 요청을 받아 웹페이지를 클라이언트에게 전달하는 서버임. 웹서버는 클라이언트가 브라우저에 URL/URI를 입력하면 요청을 받아들여 HTML 문서와 같은 정적인 콘텐츠를 제공함. HTML은 미리 작성된 문서로, 데이터가 동적으로 변경되지 않는 정적인 정보를 포함함. 웹서버는 실제 콘텐츠를 생성하지 않고, 필요 시 다른 시스템(웹애플리케이션 서버)에서 콘텐츠를 생성해 결과를 클라이언트에게 전달함.
2. 웹애플리케이션서버 (Web Application Server = WAS)
비유: 🧱 웹애플리케이션 서버는 레고 블록을 조립하는 작업대와 같음. 작업대에서는 고객이 요청한 블록들을 조립하여 완성된 구조물로 만들어 제공함. 작업대는 조립의 세부적인 작업을 처리하고, 고객의 요청에 맞춰 블록을 조합함.
설명: 🌐 **웹애플리케이션 서버(Web Application Server, WAS)**는 HTTP 기반의 동적 콘텐츠를 처리하고 생성하는 서버임. 웹애플리케이션 서버는 클라이언트의 요청을 받아, 복잡한 비즈니스 로직을 처리하고 동적으로 데이터를 생성함. 이 서버는 일반적으로 데이터베이스와 상호작용하거나 사용자 입력을 처리하여 결과를 생성함. 웹서버와는 달리, 웹애플리케이션 서버는 서버 사이드 로직을 처리하고, 이를 웹서버를 통해 클라이언트에게 전달함.
정리:
- 웹서버 (Web Server): 레고 블록을 진열하는 진열대와 같은 역할을 하며, 클라이언트의 요청을 받아서 정적인 콘텐츠를 제공하거나 다른 시스템(웹애플리케이션 서버)에 요청을 전달함.
- 웹애플리케이션 서버 (Web Application Server): 레고 블록을 조립하는 작업대와 같은 역할을 하며, 클라이언트의 요청에 따라 동적인 콘텐츠를 생성하고 웹서버를 통해 클라이언트에게 제공함.
예시:
- 웹서버: 아파치(Apache), Nginx 등은 웹서버로, 클라이언트의 요청을 받아 웹페이지를 제공함.
- 웹애플리케이션 서버: 스프링(Spring), Django, Laravel 등은 웹애플리케이션 서버로, 클라이언트의 요청을 처리하고 동적인 데이터를 생성하여 웹서버를 통해 전달함.
참고:
- 아파치 톰캣 (Apache Tomcat): 웹서버와 웹애플리케이션 서버의 기능을 결합하여, 두 역할을 모두 수행하는 서버임. 톰캣은 정적 콘텐츠를 제공하면서 동시에 동적 콘텐츠를 생성하는 기능을 가짐.
'■ SPRING LECTURES > BEGINNER' 카테고리의 다른 글
Understanding of the database (0) | 2024.09.09 |
---|---|
Postman: A Useful Tool for API Testing and Development (0) | 2024.08.15 |
Reasons for the Popularity of the Spring Framework (0) | 2024.08.14 |
Understanding Server Concepts for Studying Spring (0) | 2024.08.13 |
Definition and Role of Gradle (0) | 2024.08.13 |