Skip to content

Subscriptions

Classes

Subscriptions

Subscriptions(*args, **kwargs)

OptionsGroup

This allows some uWSGI instances to announce their presence to subscriptions managing server, which in its turn can address those nodes (e.g. delegate request processing to them) and automatically remove dead nodes from the pool.

Some routers provide subscription server functionality. See .routing.routers.

Note

Subscription system in many ways relies on Master Process.

Warning

The subscription system is meant for "trusted" networks. All of the nodes in your network can potentially make a total mess with it.


name

.name: str = ''

Name to represent the group.


plugin

.plugin: bool | str = False

Indication this option group belongs to a plugin.


set_client_params

1
2
3
4
5
6
.set_client_params(
    start_unsubscribed=None, 
    clear_on_exit=None, 
    unsubscribe_on_reload=None, 
    announce_interval=None
)

Sets subscribers related params.


set_server_params

1
2
3
4
5
6
7
8
.set_server_params(
    client_notify_address=None, 
    mountpoints_depth=None, 
    require_vassal=None, 
    tolerance=None, 
    tolerance_inactive=None, 
    key_dot_split=None
)

Sets subscription server related params.


set_server_verification_params

1
2
3
4
5
6
7
8
.set_server_verification_params(
    digest_algo=None, 
    dir_cert=None, 
    tolerance=None, 
    no_check_uid=None, 
    dir_credentials=None, 
    pass_unix_credentials=None
)

Sets peer verification params for subscription server.

These are for secured subscriptions.


subscribe

.subscribe(
    server=None, 
    key=None, 
    address=None, 
    address_vassal=None, 
    balancing_weight=None, 
    balancing_algo=None,  # (1)!
    modifier=None, 
    signing=None, 
    check_file=None, 
    protocol=None, 
    sni_cert=None, 
    sni_key=None, 
    sni_client_ca=None
)
  1. Load balancing algorithm to use. See balancing_algorithms !!! note Since 2.1

Registers a subscription intent.


algorithms

.algorithms()

Balancing algorithms available to use with subscribe.