typesense-php icon indicating copy to clipboard operation
typesense-php copied to clipboard

Prioritize writer node for write operations

Open agentile opened this issue 4 years ago • 1 comments

Description

Currently, I am avoiding using this library, as I want to be able to prioritize write operations to go directly to the leader node (if we have a healthy one). Right now it seems the only logic that happens when making API requests, is retry logic to make sure there is a healthy node, which is good, but it also means writes can go to a follower node, which is inefficient and then has to be redirected to the writer node.

Expected Behavior

Node class should encapsulate whether or not a node is the writer. Ideally this would be cached from the /debug endpoint 'state=1' value. If there is a healthy writer node available, use it for write operations to a collection.

Metadata

Typsense Version: 0.19

OS: Linux

agentile avatar Apr 08 '21 20:04 agentile

@jasonbosco can you explain why this was marked as wontfix? Just wondering what kind of a performance impact this has, evaluating using the REST API vs this library.

tedg avatar Oct 07 '24 21:10 tedg