Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Serf communication from local to http calls #1330

Merged
merged 5 commits into from
Jul 22, 2024

Conversation

leszko
Copy link
Contributor

@leszko leszko commented Jul 18, 2024

We plan to run Serf member on a different host than catalyst-api, therefore it needs to communicate remotely rather than directly accessing Serf.

Design Doc: https://www.notion.so/livepeer/Zero-Impact-Catalyst-API-Deployments-c2b15232f3a2450ba3e4803130ecd2be

Rationale behind this approach

Stateless catalyst-api needs to receive Serf user events to perform a few actions: multistream update, nuke stream, stop sessions, etc.

Technically, we have 2 options here:

  • Option 1: Catalyst receives a user event and triggers Stateless Catalyst API
  • Option 2: Stateless Catalyst API joins the serf cluster and receives the messages on its own

I chose Option 1, mainly because:

  1. Joining serf cluster by Catalyst API is not so straightforward, it requires
    • exposing serf advertise port to the public (currently we have a static configuration using hostPort, but for Stateless Catalyst API it would need to be somehow dynamic)
    • tagging different types of nodes and testing scenarios
  2. We plan to anyway replace serf with Redis or something similar

@leszko leszko changed the title Switch serf communication from local to http calls Change Serf communication from local to http calls Jul 18, 2024
@leszko leszko force-pushed the rafal/access-serf-remotely branch from 6f068ff to 75478e0 Compare July 18, 2024 14:48
We plan to run Serf member on a different host than catalyst-api, therefore it needs to communicate remotely rather than directly accessing Serf.
@leszko leszko force-pushed the rafal/access-serf-remotely branch from 75478e0 to bc260dd Compare July 18, 2024 14:51
@leszko leszko requested review from thomshutt and victorges July 18, 2024 14:51
Copy link
Contributor

@thomshutt thomshutt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, it hopefully also opens the door nicely to having something other than Serf manage the cluster state in the future

@leszko leszko merged commit fcff141 into main Jul 22, 2024
11 checks passed
@leszko leszko deleted the rafal/access-serf-remotely branch July 22, 2024 10:13
leszko added a commit that referenced this pull request Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants