How does Circus stack compare to a classical stack?
Frequently Asked Questions — Circus 0.15.0 documentation https://circus.readthedocs.io/en/latest/faq/#whycircussockets
Here is a list of frequently asked questions about Circus:
How does Circus stack compare to a classical stack?
In a classical WSGI stack, you have a server like Gunicorn that serves on a port or an unix socket and is usually deployed behind a web server like Nginx:

Clients call Nginx, which reverse proxies all the calls to Gunicorn.
If you want to make sure the Gunicorn process stays up and running, you have to use a program like Supervisord or upstart.
Gunicorn in turn watches for its processes (“workers”).
In other words you are using two levels of process managment. One that you manage and control (supervisord), and a second one that you have to manage in a different UI, with a different philosophy and less control over what’s going on (the wsgi server’s one)
This is true for Gunicorn and most multi-processes WSGI servers out there I know about. uWsgi is a bit different as it offers plethoras of options.
But if you want to add a Redis server in your stack, you will end up with managing your stack processes in two different places.
Circus’ approach on this is to manage processes and sockets.
A Circus stack can look like this:

So, like Gunicorn, Circus is able to bind a socket that will be proxied by Nginx. Circus doesn’t deal with the requests but simply binds the socket. It’s then up to a web worker process to accept connections on the socket and do the work.
It provides equivalent features than Supervisord but will also let you manage all processes at the same level, whether they are web workers or Redis or whatever. Adding a new web worker is done exactly like adding a new Redis process.
Benches
We did a few benches to compare Circus & Chaussette with Gunicorn. To summarize, Circus is not adding any overhead and you can pick up many different backends for your web workers.
See:
How to troubleshoot Circus?
By default, circusd keeps its logging to stdout rather sparse. This lack of output can make things hard to troubleshoot when processes seem to be having trouble starting.
To increase the logging circusd provides, try increasing the log level. To see the available log levels just use the –helpflag.
$ circus --log-level debug test.ini
One word of warning. If a process is flapping and the debug log level is turned on, you will see messages for each start attempt. It might be helpful to configure the app that is flapping to use a warmup_delay to slow down the messages to a manageable pace.
[watcher:webapp]
cmd = python -m myapp.wsgi
warmup_delay = 5
By default, stdout and stderr are captured by the circusd process. If you are testing your config and want to see the output in line with the circusd output, you can configure your watcher to use the StdoutStream class.
[watcher:webapp]
cmd = python -m myapp.wsgi
stdout_stream.class = StdoutStream
stderr_stream.class = StdoutStream
If your application is producing a traceback or error when it is trying to start up you should be able to see it in the output.
How does Circus stack compare to a classical stack?的更多相关文章
- [Swift]堆栈Stack的两种版本:(1)用类包装Stack (2)用泛型包装Stack
堆栈是一个在计算机科学中经常使用的抽象数据类型.堆栈中的物体具有一个特性: 最后一个放入堆栈中的物体总是被最先拿出来, 这个特性通常称为后进先出(LIFO)队列. 堆栈中定义了一些操作. 两个最重要的 ...
- a list of frequently asked questions about Circus
转自:https://circus.readthedocs.io/en/latest/faq/,可以帮助我们了解circus 的使用,以及问题解决 How does Circus stack comp ...
- Stack Overflow: The Architecture - 2016 Edition
To get an idea of what all of this stuff “does,” let me start off with an update on the average day ...
- STL--容器适配器(queue、priority_queue、stack)
适配器(Adaptor)是提供接口映射的模板类.适配器基于其他类来实现新的功能,成员函数可以被添加.隐藏,也可合并以得到新的功能. STL提供了三个容器适配器:queue.priority_queue ...
- leetcode 155. Min Stack --------- java
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. pu ...
- Java类集 List, Set, Map, Stack, Properties基本使用
首先看下继承结构: ArrayList(常用): /** * List接口继承Collection接口 * ArrayList, Vector为List接口的实现类 * add()添加新元素,remo ...
- 对Android中的堆栈的理解(Stack)
版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/Ln_ZooFa/article/details/50337529 堆栈空间分配 栈(操作系统): ...
- 数据结构设计 Stack Queue
之前在简书上初步总结过几个有关栈和队列的数据结构设计的题目.http://www.jianshu.com/p/d43f93661631 1.线性数据结构 Array Stack Queue Hash ...
- Coursera Algorithms week2 栈和队列 练习测验: Stack with max
题目原文: Stack with max. Create a data structure that efficiently supports the stack operations (push a ...
随机推荐
- java保持同一时间同一账号只能在一处登录
//登录页面 login.jsp <%@ page language="java" contentType="text/html; charset=UTF-8&qu ...
- 这是一篇SQL注入文章
目录 注入原理: 1.寻找注入点的方式或注入的地方可能包括. 2.注入点判断方法. 3.注入分类. 数字型: 字符型: 搜索型: XX型(也叫其他型): 4.注入提交方式. 5.注入攻击类型与方式. ...
- 自定义ClassLoader的使用
1 import java.io.ByteArrayOutputStream; 2 import java.io.File; 3 import java.io.FileInputStream; 4 i ...
- 万字概览 Java 虚拟机
为什么要学习 JVM 在很多 Java 程序员的开发生涯里,JVM 一直是黑盒子一般的存在,大家只知道运行 Java 程序需要依靠 JVM,千篇一律的配置几个类似 -Xms 和 -Xmx 的参数,可能 ...
- 最全Java面试题(一)
一.基础篇 1.1 java基础 面向对象的特征:继承.封装和多态 final, finally, finalize 的区别 final用于声明属性.方法和类,分别表示属性不可变.方法不可覆盖.类不可 ...
- asp.net core 5.0 中的 JsonConsole
asp.net core 5.0 中的 JsonConsole Intro asp.net core 5.0 中日志新增了 JsonConsole,还是输出日志到 Console,但是会应用 Json ...
- Golang字符串是否存在于切片或数组中的小工具(基本等同于python in语法)
// golang中是没有判断字符串是否存在数组或切片里的内置方法, 所以我们可以自己搞一个快速小组件 func Find(slice []string, val string) (int, bool ...
- 算法实验5--N皇后
实验名称 回溯法解N皇后问题 实验目的 掌握回溯递归算法.迭代算法的设计与实现: 设计回溯算法求解: 分析算法的时间复杂度. 实验环境 操作系统:win 10; 编程语言:Java: 开发工具:IDE ...
- 初识JWT
1.JWT是什么 官方网站 JWT是JSON Web Token的简称.是一种开放标准(RFC 7519),定义了一种紧凑且自包含的方式,以JSON对象的形式在各方之间安全地传输信息,因为他被数字签名 ...
- IO软件层次结构与假脱机技术
IO软件层次结构 用户层软件->设备独立性软件->设备驱动软件->中断处理程序->硬件 用户层软件实现与用户交互的接口,用户可直接使用该层提供的,与IO操作相关的库函数对设备进 ...