Skip to main content

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

ParameterType
serviceSkipService
leader{ collections: string[]; leader: { control_port: number; host: string; streaming_port: number; }; }
leader.collectionsstring[]
leader.leader{ control_port: number; host: string; streaming_port: number; }
leader.leader.control_portnumber
leader.leader.hoststring
leader.leader.streaming_portnumber

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).