zoukankan      html  css  js  c++  java
  • gunicorn 多种工作模式

    gunicorn 多种工作模式

     

    gunicorn 支持如下4种工作模式

    • Sync Workers
    • Async Workers
    • Tornado Workers
    • AsyncIO workers

    工作模式是通过work_class参数配置的值:缺省值: sync

    • sync
    • gevent
    • eventlet
    • tornado
    • gaiohttp
    • gthread

    Sync Workers (sync)

    最简单的同步工作模式

    Async Workers (gevent, eventlet)

    gevent和eventlet都是基于Greenlet库,利用python协程实现的

    Tornado Workers (tornado)

    利用python Tornado框架实现

    AsyncIO Workers (gthread, gaiohttp)

    gaiohttp利用aiohttp库实现异步I/O,支持web socket

    gthread采用的是线程工作模式,利用线程池管理连接

    本文转载自:https://www.jianshu.com/p/608a075e7d0e

  • 相关阅读:
    python笔记目录
    Django 的View(视图)系统
    051_Bootstrap 框架
    050_jQuery 事件
    049_jQuery 操作标签
    048_jQuery
    016-递归函数
    047_BOM_DOM
    046_JS
    045_CSS
  • 原文地址:https://www.cnblogs.com/xingkongzhizhu/p/12290553.html
Copyright © 2011-2022 走看看