Skip to content

Add federation #16

@jshufro

Description

@jshufro

Make rescue-api horizontally scalable by introducing a peering mechanism that distinct instances can use to communicate credential events.

First, add a new cli arg that takes a vector of peer URIs
Add a new cli arg that takes a single URI on which to handle requests from peers
Next, set up a grpc bidirectional streaming handler on that URI with a message with the same arity as a credential_event

When a new row would be inserted into credential_event, replicate it to peers by sending it to each one in the vector, as well as to any connected on the bidirectional endpoint.

When a message is received on the bidirectional endpoint, store it to credential_event, doing nothing on conflict.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions