I'm working on a async client that keeps on sending tasks to servers. To 
make it efficient and fail-tolerant, I maintain server status by constantly 
checking if the channel is working.

However, for all channel query apis, I've tried
channel::GetState(), channel::WaitForConnnected(T deadline), etc...
All of them gives segfault after multiple queries.
Does anyone know why? And how should I query about channel connectivity or 
server up/down info?

I read connectivity-semantics-and-api.md 
<https://github.com/grpc/grpc/blob/master/doc/connectivity-semantics-and-api.md>
 
and understand that connection status will become "TRANSIENT_FAILURE" if 
the server is down.

My goal here is to know if that server is later up so that I can distribute 
tasks to it. I understand that I can simply keep sending messages to 
potentially up servers and grpc will keep reconnecting if the server is 
down. But I keep tasks as a pool and send the task while removing it from 
the pool. And later if deadline is exceeded, I will then added back to the 
pool. So if I keep sending the task to an already-known-failed server, I 
would waste time resources by keep sending tasks. So any other idea for 
implementing this?

I'm not sure if I can my points clearly. My project is kind of involved and 
yet I'm a newbie to this area, sorry and thanks for reading!!

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/736eac79-cf85-4f4b-980d-691365ec001b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to