Sorry for a kubernetes mood, but I have one more q...
# community-help
d
Sorry for a kubernetes mood, but I have one more question ๐Ÿ‘๏ธ Kubernetes has two different health states: liveness โ€” when app is loaded and running, and readiness โ€” when app is ready to serve clients. Right now Iโ€™m using TCP connect to /health to decide liveness of a typesense node, and HTTP to /health to decide readiness.
/health
endpoint returns 503 when typesense is indexing on startup and in-case when lag is not healthy for reads. But at the same time it returns 200 in case of unhealthy write lag ๐Ÿค” I understand that for most cases it is better to serve read clients as soon as possible even if reads are unavailable for now, but in cluster mode it is not so critical. Maybe you have an idea how to check for the read and write readiness? My current workaround is to set read and write lags threshold to the same value, but not sure if it is viable and other conditions in /health endpoint wonโ€™t mess with a write readiness.
> as soon as possible even if reads writes are unavailable for now
k
Is your goal to consider the server as unhealthy when there is a write lag?
d
Yes, to not accept clients until writes and reads are working
k
Then the best way to do this is to set write and read lag values to the same.
๐Ÿ‘ 1