crossbario / crossbar

Crossbar.io - WAMP application router
https://crossbar.io/
Other
2.05k stars 274 forks source link

Dynamic Proxy Workers #1928

Closed om26er closed 2 years ago

om26er commented 2 years ago

Assume there is a logical grouping of 5 crossbar nodes and they have two type of realms on them.

"bob" realm is running only on 1 out of the 5 crossbar nodes/workers. It would be helpful if the proxy workers were made dynamic, where We could programmatically redirect an connection request to the specific node's IP

oberstet commented 2 years ago

This is already implemented: the master node can dynamically configure via start_proxy_realm_route:

oberstet commented 2 years ago

forgot to link the actual code in the master node that does indeed call into above:

https://github.com/crossbario/crossbar/blob/c5184c74d9bc23a1f1f51bee72c9b954ea701fef/crossbar/master/arealm/arealm.py#L351

is configuring proxy worker routes via "workergroup_placements"

https://github.com/crossbario/crossbar/blob/c5184c74d9bc23a1f1f51bee72c9b954ea701fef/crossbar/master/arealm/arealm.py#L384

and above proxy routes are part of the configuration setup

https://github.com/crossbario/crossbar/blob/c5184c74d9bc23a1f1f51bee72c9b954ea701fef/crossbar/master/arealm/arealm.py#L245

part of

https://github.com/crossbario/crossbar/blob/c5184c74d9bc23a1f1f51bee72c9b954ea701fef/crossbar/master/arealm/arealm.py#L178

if the application realm has a (frontend) webcluster assigned (to accept incoming client connections), setup proxy backend connections and routes to the router workers in the router worker group of the application realm