serving icon indicating copy to clipboard operation
serving copied to clipboard

How could I use tf-serving via DNS??

Open elvys-zhang opened this issue 8 years ago • 3 comments

I would like to deploy my tensorflow serving on multiple servers. For example, on 1.1.1.1, 1.1.1.2, 1.1.1.3. All of them were bint to a DNS, like "tensorflow.serving.local".

I deployed my tensorflow serving like this on each server

tensorflow_model_server --port=8502 --model_name=mnist --model_base_path=${PWD}/models/mnist_models

When I run "python mnist_client.py --server=1.1.1.1:8502 --work_dir=/xxx/models/mnist_models --num_test=500", it worked fine.
Then I tried to call these servers via DNS by modifying mnist_client.py from:

channel = implementations.insecure_channel(host, int(port))

to

channel = implementations.insecure_channel(hostport, int(8502))

If hostport was "dns:///tensorflow.serving.local", it would return this

AbortionError(code=StatusCode.UNAVAILABLE, details="Name resolution failure")

if hostport was "tensorflow.serving.local", it would return this

AbortionError(code=StatusCode.UNAVAILABLE, details="Connect Failed")

So I just wonder if I made something wrong? Or there are some other ways to support GRPC via DNS?? Thx.

elvys-zhang avatar Jul 19 '18 11:07 elvys-zhang

This was fixed, and i will close it. If someone has the same issue, I would like to share.

elvys-zhang avatar Jul 20 '18 13:07 elvys-zhang

@elvys-zhang Hi, could you share your solution if possible. Thx

josue avatar Oct 05 '18 03:10 josue

@josue I used kubernetes to deploy my serving and traefik as my proxy. The problem I have met was that when traefik transmit GRPC requests, it deleted 'te' header in the request. Then error occured. Have no idea of your situation, not sure if it helps.

elvys-zhang avatar Oct 15 '18 10:10 elvys-zhang