Preset: Empire

This preset offers configuration helpers related to Emperor and his vassals.

class uwsgiconf.presets.empire.Broodlord(zerg_socket, zerg_die_on_idle=None, vassals_home=None, zerg_count=None, vassal_overload_sos_interval=None, vassal_queue_items_sos=None, section_emperor=None, section_zerg=None)

This mode is a way for a vassal to ask for reinforcements to the Emperor.

Reinforcements are new vassals spawned on demand generally bound on the same socket.

Warning

If you are looking for a way to dynamically adapt the number of workers of an instance, check the Cheaper subsystem - adaptive process spawning mode.

Broodlord mode is for spawning totally new instances.

Parameters:
  • zerg_socket (str|unicode) – Unix socket to bind server to.
  • zerg_die_on_idle (int) – A number of seconds after which an idle zerg will be destroyed.
  • vassals_home (str|unicode|list[str|unicode]) – Set vassals home.
  • zerg_count (int) – Maximum number of zergs to spawn.
  • vassal_overload_sos_interval (int) – Ask emperor for reinforcement when overloaded. Accepts the number of seconds to wait between asking for a new reinforcements.
  • vassal_queue_items_sos (int) – Ask emperor for sos if backlog queue has more items than the value specified
configure()

Configures broodlord mode and returns emperor and zerg sections.

Return type:tuple