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

SDK to handle REST redirect from follower to leader on queries (GET) #3

Open
tock-ibm opened this issue Jun 7, 2021 · 0 comments
Open
Assignees

Comments

@tock-ibm
Copy link
Contributor

tock-ibm commented Jun 7, 2021

Queries (GET) may be directed to the leader or a follower depending on the “read-concern” specified in the transaction context. The query should specify its read-concern so that the server can redirect it if necessary.

The server's REST layer redirects the client from a follower to the leader using a status code 307 (temporary) / 308 (permanent). Since the leader seldom changes the SDK may remember the redirection and use the new target in all future requests (until another redirect).

@tock-ibm tock-ibm self-assigned this Oct 13, 2021
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

No branches or pull requests

1 participant