Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Raft reverse proxy API calls to leader #408

Merged
merged 27 commits into from
Feb 15, 2018
Merged

Conversation

shlomi-noach
Copy link
Collaborator

Closes #245

This PR introduces a reverse proxy for API calls such that:

  • when running Raft

  • when calling selected /api/... calls on a non-leader

  • when the node is a valid follower (can see the leader)

  • the node will reverse proxy the request to the leader

  • excluded from reverse-proxy: queries like status, raft-health, raft-state, lb-check etc., which are node-specific.

This will allow querying any valid raft node as well as making changes, refactoring, etc.

Introduced: /api/raft-health: a health/readiness check to confirm the node is a healthy part of the raft group.

@shlomi-noach shlomi-noach temporarily deployed to production/mysql_cluster=concertmaster February 13, 2018 11:47 Inactive
@shlomi-noach shlomi-noach temporarily deployed to production/mysql_cluster=concertmaster February 13, 2018 12:03 Inactive
@shlomi-noach shlomi-noach temporarily deployed to production/mysql_cluster=concertmaster February 13, 2018 14:17 Inactive
@shlomi-noach shlomi-noach temporarily deployed to production/mysql_cluster=conductor February 14, 2018 10:03 Inactive
@shlomi-noach shlomi-noach temporarily deployed to production/mysql_cluster=concertmaster February 14, 2018 10:26 Inactive
@shlomi-noach shlomi-noach had a problem deploying to production/mysql_cluster=conductor February 14, 2018 10:26 Failure
@shlomi-noach shlomi-noach temporarily deployed to production/mysql_cluster=conductor February 14, 2018 10:27 Inactive
@shlomi-noach shlomi-noach temporarily deployed to production/mysql_cluster=concertmaster February 14, 2018 10:36 Inactive
@shlomi-noach shlomi-noach had a problem deploying to production/mysql_cluster=conductor February 14, 2018 10:36 Failure
@shlomi-noach shlomi-noach temporarily deployed to production/mysql_cluster=conductor February 14, 2018 10:37 Inactive
@shlomi-noach shlomi-noach temporarily deployed to production/mysql_cluster=concertmaster February 14, 2018 10:52 Inactive
@shlomi-noach
Copy link
Collaborator Author

shlomi-noach commented Feb 14, 2018

  • documentation

@shlomi-noach shlomi-noach temporarily deployed to production/mysql_cluster=concertmaster February 14, 2018 14:32 Inactive
@shlomi-noach shlomi-noach had a problem deploying to production/mysql_cluster=conductor February 14, 2018 14:32 Failure
@shlomi-noach shlomi-noach temporarily deployed to production/mysql_cluster=conductor February 14, 2018 14:32 Inactive
@shlomi-noach shlomi-noach temporarily deployed to production/mysql_cluster=concertmaster February 14, 2018 14:32 Inactive
@shlomi-noach shlomi-noach changed the title WIP: Raft reverse proxy API calls to leader Raft reverse proxy API calls to leader Feb 15, 2018
@shlomi-noach
Copy link
Collaborator Author

This works well.

@shlomi-noach shlomi-noach temporarily deployed to production/mysql_cluster=conductor February 15, 2018 09:36 Inactive
@shlomi-noach shlomi-noach had a problem deploying to production/mysql_cluster=concertmaster February 15, 2018 09:36 Failure
@shlomi-noach shlomi-noach temporarily deployed to production/mysql_cluster=conductor February 15, 2018 09:37 Inactive
@shlomi-noach shlomi-noach temporarily deployed to production/mysql_cluster=concertmaster February 15, 2018 09:37 Inactive
@shlomi-noach shlomi-noach had a problem deploying to production/mysql_cluster=conductor February 15, 2018 11:24 Failure
@shlomi-noach shlomi-noach had a problem deploying to production/mysql_cluster=concertmaster February 15, 2018 11:24 Failure
@shlomi-noach shlomi-noach temporarily deployed to production/mysql_cluster=conductor February 15, 2018 11:28 Inactive
@shlomi-noach shlomi-noach had a problem deploying to production/mysql_cluster=concertmaster February 15, 2018 11:28 Failure
@shlomi-noach shlomi-noach merged commit 04f0e2a into master Feb 15, 2018
@shlomi-noach shlomi-noach deleted the raft-reverse-proxy branch February 15, 2018 11:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants