我们用C实现了一个 gRPC 
的域名解析插件(在grpc_plugin_registry.c里面注册),这个插件根据域名去zookeeper上找某个角色对应的ip和端口。当这个角色重启后,如果它是在其他机器上启动的,我们修改zk上的ip端口信息。此时,gRPC
 
却还是按照老的ip端口对它进行解析。我们期望 gRPC 能够在连接老的ip和端口失败N次后重新调用域名解析,解析到新的ip和端口。请问一下 
gRPC 有办法实现吗?
 

We use C to achieve a gRPC domain name resolution plugin (register in 
grpc_plugin_registry.c), the plugin search the IP and port of one role in 
zookeeper. When this role is restarted, if it is started on other machines, 
we modify the IP port information on the ZK. At this point, gRPC  is using 
the old IP port. We expect gRPC to be able to reconcile domain name 
resolution, parsing to new IPs and ports after connecting old IP and port 
failures n times. Will gRPC have a way to achieve it?


On Monday, July 17, 2017 at 12:48:59 PM UTC+8, Spencer Fang wrote:
>
> In Java, the name resolver's `refresh()` method should be called when a 
> channel experiences a transient error:
>
> https://github.com/grpc/grpc-java/blob/master/core/src/main/java/io/grpc/internal/ManagedChannelImpl.java#L603
>  
> <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fgrpc%2Fgrpc-java%2Fblob%2Fmaster%2Fcore%2Fsrc%2Fmain%2Fjava%2Fio%2Fgrpc%2Finternal%2FManagedChannelImpl.java%23L603&sa=D&sntz=1&usg=AFQjCNEFzbEoLMXOzXB2bqoeh7bTGZNErw>
>
> Can you elaborate more about how you are producing this problem?
>
> On Sun, Jul 16, 2017 at 9:10 PM, <[email protected] <javascript:>> wrote:
>
>> We implement a resolve plugin, we expect that if the connection failed n 
>> time, it will resolve address again. but it has never happened in our case. 
>> Does gRPC support that? 
>>
>> -- 
>> 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] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> 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/5ed8ffc2-e378-40a3-b4f6-7fb31c720b66%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/grpc-io/5ed8ffc2-e378-40a3-b4f6-7fb31c720b66%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Spencer Fang
>

-- 
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/c226cc5f-98a3-45c9-b9af-791f87f56de0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to