asFollower()
function asFollower(service, leader): SkipService
Run a SkipService as a follower in a leader-follower topology.
Instead of running a service on one machine, it can be distributed across multiple in a leader-follower architecture, with one "leader" maintaining the shared computation graph and one or more "followers" across which client-requested resource instances are distributed.
Parameters
| Parameter | Type |
|---|---|
service | SkipService |
leader | { collections: string[]; leader: { control_port: number; host: string; streaming_port: number; }; } |
leader.collections | string[] |
leader.leader | { control_port: number; host: string; streaming_port: number; } |
leader.leader.control_port | number |
leader.leader.host | string |
leader.leader.streaming_port | number |
Returns
SkipService
The follower component to run service in such a configuration, given the leader's address and the names of the shared computation graph collections to be mirrored from it (typically the ResourceInputs of service).