Explanation of Typesense's server parameters `--healthy-read-lag` and `--healthy-write-lag`.
TLDR Eric asked about the significance of specific server configuration parameters in Typesense. Jason provided a detailed explanation of how these parameters work during data writes and reads.
1
Dec 28, 2021 (25 months ago)
Eric
11:41 PM--healthy-read-lag
and --healthy-write-lag
mean. What would the implications be if they were both set to 0? I have a rudimentary understanding of the Raft consensus algorithm, but I don't know exactly how Typesense implements it.
Jason
11:42 PMJason
11:48 PMSo if the lag is over
--healthy-write-lag
, then additional writes are rejected with an HTTP 503 while writes already in the log are applied, and lag eventually reduces below this threshold. If the lag is over --healthy-read-lag
, then all reads (eg: searches) also start returning a 503. The former is useful if you don't want to overwhelm the cluster with writes and you want a backoff indicator for the system that is writing into Typesense. The latter is useful in cases where you'd rather not serve any stale data for searches and want to wait for the data that has been sent to Typesense to be available for searchDec 29, 2021 (25 months ago)
Eric
02:25 AM1
Typesense
Indexed 3015 threads (79% resolved)
Similar Threads
Understanding Typesense Throttling Parameters
Nelson queried about Typesense parameters `--healthy-read-lag` and `--healthy-write-lag`. Jason explained that these control widespread write operations and ensure read prioritization. They further elaborated on interpreting logs and network request thresholds.
Addressing Typesense Server Issues and Optimization Needs
Robert had an issue with a 'stuck' typesense server. Jason and Kishore Nallan gave advice on handling writes, configuration for high search volumes, and running multiple typesense instances. They also recommended monitoring CPU usage and updating the server version for bug fixes.
Typesense Instance Issues and Solutions on K8s
Richard encountered issues with a typesense instance, including lag, unresponsiveness, and shut downs. Jason provided potential causes and solution, including adjusting configuration settings and clearing data directory. This resolved Richard's issues.