Ryu
  • 👩🏻‍💻 Ryu / software_engineer
  • ✨Resume
  • Python3
    • Python3 가상환경 설정하기
      • Python3 vs Python2
      • Pyenv
      • Venv
      • Pip
    • Flask
      • Flask 설치하기
      • API Server 만들기
    • REST API
    • Command Line 활용하기
    • Module 사용하기
      • Pickle - 자료형을 파일로 저장할 때
    • MongoDB connection
      • Pymongo
    • WSGI
      • 💡WSGI 가 필요한 이유
      • Web Server / WSGI / Middleware / Application 구조
      • WSGI Middleware 종류
      • Gunicorn
        • Gunicorn vs Uwsgi
    • Dockerize
      • 💡Dockerize 가 필요한 이유
      • 1. Create Dockerfile
        • Gunicorn 으로 nginx 와 app 연결하기
    • Kubernetes 로 배포하기
      • 💡Kubernetes 가 필요한 이유
      • Helm 사용하기
      • Helm 으로 k8s 에 앱 배포하기
  • Open Tracing (정리중)
    • Open Tracing 이란 무엇인가
    • Python OpenTracing Example
    • Jaeger, Jaeger UI
    • Python Jaeger Tutorial
    • Zipkin 알아보기
    • Jaeger-client 리스팅
  • Microservice Architecture
    • Netflix의 MSA 컨셉
      • ⚡️ MSA 를 도입할때 고려해야할 점들
  • Paper
    • Dynamo: Amazon’s Highly Available Key-value Store
      • 1. Introduction
      • 2. Background
      • 3. Related Work
        • Related Paper) Pastry, Chord
        • Byzantine Fault Tolerance
      • 4. System Architecture
        • 4.1 System Interface
        • 4.2 Partitioning
        • 4.3 Replication
        • Hash Function
  • Frontend
    • CommonJS 와 AMD
    • RequireJS
    • WebSocket
      • WebSocket vs Socket.io
      • polling vs long polling vs streaming
    • Vue.js
      • Vue.js 에서 WebSocket 사용하기
      • [프로젝트] Vue, Vuex, AntDesignVue 로 운영툴 만들기
    • React x Redux 로 프로젝트 만들기
      • 0. React, Redux 를 선택한 이유
      • 1. 프로젝트 생성하고 Webpack4 적용하기
      • 2. React 와 ReactDOM 적용하기
      • 3. Material UI 적용하기
  • Data Engineering
    • Spark
      • Spark 이란?
      • 각 데몬의 역할 Driver, Master, Worker
      • 장단점 / 함께사용하는 툴 / 사용 사례
  • Service Mesh (정리중)
    • RPC
    • gRPC - Python Server 만들기
      • step 2.
Powered by GitBook
On this page
  • 전체 구조
  • 전체 Flow
  • WAS
  • WSGI
  • WSGI Middleware
  • Application

Was this helpful?

  1. Python3
  2. WSGI

Web Server / WSGI / Middleware / Application 구조

Web Server / WSGI / Middleware / Application 의 구조와 각 요소별 역할

전체 구조

전체 Flow

  1. Web Server 로 HTTP Request 가 들어옵니다.

  2. Server-side 작업이 필요한 경우, WSGI Middleware 를 통해 Application 으로 Request 를 전달합니다.

  3. Application 에서 로직을 통해 Request 를 처리한 후, WSGI Middleware 를 통해 Response 를 돌려줍니다.

🔍 각 컴포넌트 상세

WAS

  • Nginx + Gunicorn 위에 Flask 로 만든 REST API Application 을 올리면 WAS 가 구성된 것입니다.

WSGI

  • Web Server Gateway Interface

  • Web Server 가 받은 호출을 Python Application 에 전달하고 응답받는 등 서로 통신하기 위해 필요한 호출 Convention 입니다.

WSGI Middleware

  • Web Server 와 Application 을 연결시켜 줍니다.

  • WSGI module + WSGI process = WSGI middleware

  • Application 관점에서 Middleware 를 통해 App이 실행되므로, App을 실행시켜주는 Application Container 라고 할 수 있습니다.

📌 Middleware 종류

  • Gunicorn

  • uWSGI

  • CherryPy

Application

PreviousWSGI 가 필요한 이유NextWSGI Middleware 종류

Last updated 6 years ago

Was this helpful?