2학년 하계방학 - 웹개발 (Draft)

완성된 노트는 개인 Notion 계정으로 옮겨짐.

— 웹 심화 교재 요약

네트워크 기초

Internet: 전 세계 컴퓨터와 네트워크를 연결하는 거대한 정보 통신망.
IP: 인터넷에서 장치들을 식별하고 위치를 지정하는 주소 체계.
DNS: 도메인 이름을 IP 주소로 변환해주는 시스템.
클라이언트-서버: 클라이언트가 서버에 요청을 보내고 서버가 응답하는 네트워크 구조.

네트워크 프로토콜 및 통신

TCP/UDP: 데이터 전송을 위한 신뢰성 있는(또는 비신뢰성 있는) 프로토콜.
3-way Handshake: TCP 연결을 확립하기 위한 세 단계 과정.
WebSocket: 실시간 양방향 통신을 위한 프로토콜.

네트워크 장비 및 도구

프록시 서버: 클라이언트와 서버(인터넷) 사이에 중개 역할을 하는 서버.
WireShark: 네트워크 트래픽의 패킷을 분석하는 도구.

웹 기술 및 서버

HTTP Cache: 웹 페이지 로딩 속도를 높이기 위해 데이터를 임시 저장하는 기술.
HTTP ETag: 웹 캐시 유효성을 검증하기 위해 사용하는 식별자.
HTTP 보안헤더: 웹 앱의 보안을 강화하기 위한 HTTP 헤더.
HTTP 자격증명 헤더: HTTP 요청에서 사용자 인증 정보를 전달하는 헤더.

데이터 저장 및 관리

Cookie, Storage (ft. Session): 웹 브라우저에서 데이터를 저장하고 관리하는 방법.

비동기 통신 기법

폴링 (Polling): 주기적으로 서버에 요청을 보내 상태를 확인하는 방식.
롱 폴링 (Long polling): 서버에서 즉각 응답을 주지 않고 대기하다가 데이터가 준비되면 응답하는 폴링 방식.

API 및 데이터 쿼리

GraphQL: 효율적인 데이터 쿼리를 위해 사용하는 API 쿼리 언어.

웹 서버 및 앱 서버

WS, WAS: Web Server(웹 서버)와 Web Application Server(웹 앱 서버)의 약자.
Nginx, Apache: 널리 사용되는 웹 서버 소프트웨어.

Node.js 및 프레임워크

Node.js: 서버 측 자바스크립트 런타임 환경.
Express.js, NestJS: Node.js를 위한 웹 앱 프레임워크.
Sure, here’s the detailed journey of a web request from the user's browser to the database:
1.
User's Browser:
The user initiates the request by typing a URL or clicking a link.
2.
Local Operating System (OS):
The browser communicates with the local OS to resolve the URL to an IP address.
3.
DNS Resolver:
The local OS sends a DNS query to a DNS resolver (often an ISP's resolver or a public resolver like Google’s 8.8.8.8).
4.
Root DNS Server:
The DNS resolver queries a root DNS server for the top-level domain (TLD) server.
5.
TLD DNS Server:
The root server responds with the address of a TLD DNS server (e.g., .com, .net).
6.
Authoritative DNS Server:
The TLD server directs the query to the authoritative DNS server for the specific domain.
7.
DNS Resolver (continued):
The authoritative DNS server returns the IP address for the requested domain to the DNS resolver.
The DNS resolver caches the IP address and returns it to the user's browser.
8.
User's Browser (continued):
With the IP address, the browser establishes a TCP connection to the web server.
If HTTPS is used, a TLS handshake occurs to establish a secure connection.
9.
Client's ISP Network:
The request travels through the user's ISP network to the internet backbone.
10.
Internet Backbone:
The request traverses through various routers and switches on the internet backbone.
11.
Destination ISP Network:
The request reaches the ISP network hosting the web server.
12.
Web Server Load Balancer:
The request may first hit a load balancer that distributes incoming requests across multiple web servers.
13.
Web Server:
The load balancer routes the request to an appropriate web server based on availability and load.
14.
Web Application Server:
The web server forwards the request to the application server where the web application logic resides.
15.
Web Application Logic:
The application processes the request, which may involve executing scripts, running code, etc.
16.
Cache Layer:
The application checks the cache (e.g., Redis, Memcached) to see if the requested data is already available.
17.
Database Query:
If the data is not in the cache, the application formulates a database query.
18.
Database Proxy/Connection Pool:
The query might first go through a database proxy or connection pool manager to optimize connections.
19.
Database Server:
The query is sent to the database server where the actual data resides.
20.
Database Storage Engine:
The database server processes the query using its storage engine, retrieves the necessary data, and returns the result.
21.
Web Application Logic (continued):
The application processes the database response, potentially transforming or formatting the data.
22.
Web Server Response:
The processed data is sent back to the web server as part of the HTTP response.
23.
Client's ISP Network (Return Path):
The response travels back through the ISP network and internet backbone, following a similar path in reverse.
24.
User's Browser (Return Path):
The response is received by the user's browser, which then renders the data to display the web page.
Throughout this journey, the request and response might also interact with various intermediary systems like:
CDN (Content Delivery Network):
To serve static content (e.g., images, scripts) from geographically distributed servers closer to the user.
Security Systems:
Firewalls, Intrusion Detection/Prevention Systems (IDS/IPS), and Web Application Firewalls (WAFs) to monitor and secure the traffic.
Monitoring and Logging Systems:
Systems that track the request for performance monitoring, logging, and analytics purposes.
This list includes all the critical steps and components a web request typically encounters from the user's browser to the database and back.