On demand vassals via subscriptions

Spawn an Emperor with a command socket (it is a channel allowing external process to govern vassals) and instruct it to not spawn vassals until a ‘spawn’ command is received.

emperor = /etc/uwsgi/vassals
emperor-command-socket = /run/emperor.socket
emperor-wait-for-command = true

Spawn a Fastrouter on port :3031 with a subscription server on port :4041 and instruct it to contact the specific emperor socket whenever an inactive instance is found:

master = true
fastrouter = :3031
fastrouter-subscription-server =
; the emperor socket to contact
fastrouter-emperor-socket = /tmp/emperor.socket
fastrouter-stats-server =

Place your vassals in /etc/uwsgi/vassals ensuring each of them correctly subscribe to the fastrouter (this subscription is required to mark ‘inactive subscruptions’ as ‘active’

Now you can start putting ‘inactive’ subscriptions in the fastrouter, using raw datagrams. An example inactive subscription packets can be something like this in the –subscribe2 way:


this will instruct the fastrouter to map the Host to the inactive uWSGI server that will run on and to run the one.ini vassal at the first request.