Web 3-layer structure ~ Web server / AP server / DB server ~

Web memorandum.

Web 3-layer structure

A Web 3-tier application is an application that divides the components of a Web system into three layers, a presentation layer, an application layer, and a data layer, and designs them as independent modules.

Web server (presentation layer)

A server like an entrance that first receives an HTTP request from a client. Returns a response here. Passes static files (hmtl, css, js, image files). If dynamic processing is required, AP server Request processing to. Chrome and Firefox are in charge.

Example) Apache, Nginx, IIS (Internet Information Services), etc.

AP server (application layer)

The server where the program is located. In response to a request from the Web server, the process is returned to the Web server or data is requested from the DB server.

Example) Tomcat, GlassFish, Gunicorn, Unicorn, etc.

DB server (data layer)

-** DB server **: A server that writes, retrieves, and updates data from storage using SQL in response to an AP server request, and passes the data.

Example) Oracle, PostgreSQL, etc.

Web API API = Application Programming Interface. A method for operating a web service from programming. The web API passes only data (JSON, XML) to the application as a response to a request from a client. After ** RESTful ** was proposed in Ruby on Rails , RSETful API gets a lot of attention.

Web 2-layer structure

A structure in which the Web server and AP server are integrated. However, recent websites basically have a three-layer structure.

WSGI Web applications such as ** Django ** and ** Flask **, which are Python web frameworks, can be found in WSGI (Web Server Gateway Interface). Designed according to it (called a WSGI application). In each of the Python web frameworks, the interface for connecting the web server and the web application was independent, so there was a problem that the servers that could be used were limited. To solve this problem, the web application in Python We have established a standard specification for connecting to a Web server. That is WSGI.

Remarks

--Monitoring server: Server that monitors the status of the server --Job server: Server that manages jobs

reference

Web 3-layer structure

What is a server? Types of servers in WEB 3-layer structure Start a web server using Bottle and Flask (I also tried using Apache) What is a WSGI application? From web framework to WSGI server Web Server Gateway Interface

MVC model

Basics of Web Technology ~ Structure of Web Application ~

Recommended Posts

Web 3-layer structure ~ Web server / AP server / DB server ~
Web server construction commentary
One Liner Web Server
Ubuntu (18.04.3) Web server construction
Web system construction (super basic) ③: DB server construction and basic operation
Merry Christmas web server
Web system construction (super basic) ②: AP server construction and basic operation