본문 바로가기
컴퓨터사이언스

구니콘 (Gunicorn) 이란?

by 괴짜코더 2022. 4. 17.

구니콘 공식 사이트

 

Gunicorn - Python WSGI HTTP Server for UNIX

Deployment Gunicorn is a WSGI HTTP server. It is best to use Gunicorn behind an HTTP proxy server. We strongly advise you to use nginx. Here's an example to help you get started with using nginx: server { listen 80; server_name example.org; access_log /var

gunicorn.org

구니콘이란 파이썬의 Web Server Gateway interface (WSGI)를 구현하는 HTTP server이다. 구니콘은 GreenUnicorn의 약자이며 jee-unicorn 또는 gun-i-corn이라 발음하기도 한다. 루비에서의 유니콘 프로젝트에서 이식되었던 프리 포크의 워커 모델을 사용하고 있다. 구니콘 서버는 다수의 web 프레임워크와 널리 호환되며 구현이 심플하고, 서버 리소스가 적으며, 빠른 속도로 동작합니다.

구니콘 깃-허브 리포지토리

 

GitHub - benoitc/gunicorn: gunicorn 'Green Unicorn' is a WSGI HTTP Server for UNIX, fast clients and sleepy applications.

gunicorn 'Green Unicorn' is a WSGI HTTP Server for UNIX, fast clients and sleepy applications. - GitHub - benoitc/gunicorn: gunicorn 'Green Unicorn' is a WSGI HTTP Server for UNIX, ...

github.com

아키텍처


서버 모델은 다음과 같은 요소로 구성되어있습니다.

  • worker를 관리하는 central Master Process
  • worker process에 따라 처리되는 request
  • component
    • Master
    • Sync worker
    • Tornado worker
    • AsyncIO worker

특징


 

  • WSGI, web2 py, Django, Paster를 네이티브에서 서포트
  • 자동적인 worker의 process 관리
  • 심플한 python 설정
  • 복수의 worker 설정
  • 확장성을 위한 여러 서버 훅
  • 파이썬 2.6 이후로부터 파이썬 3.2 이후와의 호환성이 가능하다
  • MIT 라이선스

pip install gunicorn


root@zetawiki:~# pip install gunicorn
Collecting gunicorn
  Downloading gunicorn-19.7.1-py2.py3-none-any.whl (111kB)
    100% |████████████████████████████████| 112kB 1.2MB/s 
Installing collected packages: gunicorn
Successfully installed gunicorn-19.7.1

파이썬 WSGI 서버 목록


서버 Bjoern CherryPy Gevent Gunicorn Meinheld mod_wsgi TwistedWeb uWSGI
안정성 ? ?  ★  ★ ★ ?  ★  ★  ★ ★

참고 문서

 

 

댓글