Preset: Empire

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

class uwsgiconf.presets.empire.Broodlord(zerg_socket: str, *, zerg_die_on_idle: int = None, vassals_home: Union[str, List[str]] = None, zerg_count: int = None, vassal_overload_sos_interval: int = None, vassal_queue_items_sos: int = None, section_emperor: uwsgiconf.config.Section = None, section_zerg: uwsgiconf.config.Section = 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 – Unix socket to bind server to.
  • zerg_die_on_idle – A number of seconds after which an idle zerg will be destroyed.
  • vassals_home – Set vassals home.
  • zerg_count – Maximum number of zergs to spawn.
  • vassal_overload_sos_interval – Ask emperor for reinforcement when overloaded. Accepts the number of seconds to wait between asking for a new reinforcements.
  • vassal_queue_items_sos – Ask emperor for sos if backlog queue has more items than the value specified
  • section_emperor – Custom section object.
  • section_zerg – Custom section object.
configure() → Tuple[uwsgiconf.config.Section, uwsgiconf.config.Section]

Configures broodlord mode and returns emperor and zerg sections.