feat: Initial commit with full deployment architecture and scripts
This commit is contained in:
commit
abb3efe114
96 files changed
+16789
No files matched your search
@@ -0,0 +1,28 @@
|
||||
|
||||
"""
|
||||
backend/gunicorn_config.py
|
||||
生产环境 Gunicorn 配置 (支持高并发)
|
||||
"""
|
||||
import multiprocessing
|
||||
|
||||
# 绑定地址
|
||||
bind = "0.0.0.0:8000"
|
||||
|
||||
# 核心:使用 Gevent 异步 Worker
|
||||
worker_class = "gevent"
|
||||
|
||||
# Worker 数量:通常 CPU 核数 * 2 + 1
|
||||
workers = multiprocessing.cpu_count() * 2 + 1
|
||||
|
||||
# 核心:每个 Worker 最大并发连接数
|
||||
# Gevent 下这个值可以设置得很高,支持海量 SSE 连接
|
||||
worker_connections = 2000
|
||||
|
||||
# 超时设置 (SSE 长连接需要较长超时)
|
||||
timeout = 120
|
||||
keepalive = 5
|
||||
|
||||
# 日志
|
||||
accesslog = "-"
|
||||
errorlog = "-"
|
||||
loglevel = "info"
|
||||
Reference in new issue
Block a user