zulip/zilencer
Alex Vandiver d47637fa40 queue: Set a max consume timeout with SIGALRM.
SIGALRM is the simplest way to set a specific maximum duration that
queue workers can take to handle a specific message.  This only works
in non-threaded environments, however, as signal handlers are
per-process, not per-thread.

The MAX_CONSUME_SECONDS is set quite high, at 10s -- the longest
average worker consume time is embed_links, which hovers near 1s.
Since just knowing the recent mean does not give much information[1],
it is difficult to know how much variance is expected.  As such, we
set the threshold to be such that only events which are significant
outliers will be timed out.  This can be tuned downwards as more
statistics are gathered on the runtime of the workers.

The exception to this is DeferredWorker, which deals with quite-long
requests, and thus has no enforceable SLO.

[1] https://www.autodesk.com/research/publications/same-stats-different-graphs
2020-10-06 17:26:14 -07:00
..
lib billing: Move zilencer/lib/stripe to corporate. 2018-10-01 15:43:44 -07:00
management queue: Set a max consume timeout with SIGALRM. 2020-10-06 17:26:14 -07:00
migrations python: Modernize legacy Python 2 syntax with pyupgrade. 2020-04-09 16:43:22 -07:00
README.md
__init__.py
forms.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
models.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
urls.py rest: Add rest_path shortcut for path with rest_dispatch. 2020-09-22 10:51:00 -07:00
views.py push_notifications: Simplify `if device exists` checks. 2020-08-31 17:31:41 -07:00

README.md

ZILENCER -- The Zulip License Manager

This app is the place for storing state about various deployments of Zulip that exist in the world.