Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Name resolver support for C# missing #11879

Closed
Falco20019 opened this issue Jul 19, 2017 · 12 comments
Closed

Name resolver support for C# missing #11879

Falco20019 opened this issue Jul 19, 2017 · 12 comments

Comments

@Falco20019
Copy link
Contributor

What version of gRPC and what language are you using?

GRPC 1.4.1 C# from NuGet package

What operating system (Linux, Windows, …) and version?

Windows 7 64-bit

What runtime / compiler are you using (e.g. python version or version of gcc)

C# compiler from within VS2015

What did you do?

  • Created a project which should use name resolver for service discovery
  • Looked at Channels and the rest of the API

What did you expect to see?

Find a way to implement a name resolver like with grpc-java

What did you see instead?

It seems that name resolving is not implemented but only using C core implementation. Wrapper methods to define a resolver would be needed.

Anything else we should know about your project / environment?

This ticket is related to #11843.

@jtattermusch
Copy link
Contributor

All name resolution functionality is provided by C core. The reason is we don't want to duplicate the effort.
What kind of name resolver you need to plug in?

@Falco20019
Copy link
Contributor Author

Falco20019 commented Jul 19, 2017

I need to be able to give my own responses based on what services are loaded. Most of the time, we don't have a big amount of services and also don't need load balancing but still want to keep the architecture open for that. That's why our central platform, which is configuring and orchestrating the services, should have a small built in discovery service. So that it's easy to use those same modules either on a terminal (small scale) or in the cloud (big scale) in case that the customer has no own infrastructure.

Some of the services request data right after startup from others. That's why I would also like to use the channels ability for lookup and automatic backoff. We currently have a highly modular software with around 300 modules, but the current platform is somewhat limited. GRPC and ProtoBuf solves already a lot of the issues. That's why we would like to migrate, and to be future proof for our current plans.

It's for the company I'm working for. So I can give you more details on the use case, but only on a private channel.

@Falco20019
Copy link
Contributor Author

Falco20019 commented Jul 20, 2017

So getting access through the C# library to define a name resolver in c-core would be one option. I don't know how hard this would be to implement. Another option I thought of, would be to go the load-balancer route.

Since the c-core supports grpclb, I would be fine to implement the load_balancer.proto in C# and just return the correct endpoints. But since authorities are not supported in DNS resolvers (only with c-ares, which AFAIK is not supported in GRPC for windows), I would have to define all services as DNS entries to redirect to my name resolving load balancer. So for that scenario, I would still need to be able to define a name resolver in C# API, which is just delegating all requests to a predefined load balancer which is easier to implement since it has no user logic, just the load balancer IP endpoint.

I don't really like this way of abusing the load balancer concept as name resolver, but I'm just thinking a bit on how to solve the problem until there is native support.

@Falco20019
Copy link
Contributor Author

Falco20019 commented Jul 26, 2017

Just for purpose of understanding: AFAIK GRPC has no environment variables or knobs for setting the DNS server to use. So I have to setup a DNS server on the OS level, right?

@jtattermusch
Copy link
Contributor

@Falco20019 I think that's right.
CC @y-zeng who knows more about this topic.

@Falco20019
Copy link
Contributor Author

Any news, plans or other issues on this topic? I'm fine with any approach (wrapper for c-core resolver, C# specific, something like c-ares but working with windows, ...). I only need it by around end of the year, so not time critical yet. I'm also looking forward to #11646

@jtattermusch
Copy link
Contributor

Updates:

  • we've migrated to c-ares 1.13 recently (because that version comes with cmake support and building on windows has become easier).
  • c-ares bindings for windows are currently WIP (Making c-ares work under Windows. #12416).

Besides these we don't have any plans, at least not before the end of this year.

@Falco20019
Copy link
Contributor Author

Ok, thanks for the news :) then I will use my workaround until then. Should do it for the moment. I could look into wrapping the C stuff myself and do a PR when it becomes relevant to our company.

@Falco20019
Copy link
Contributor Author

@dunkymole
Copy link

Hey. I am hearing not before the end of the year for c-ares on Windows. I am also interested in the dns:/// resolver. Do you have any higher resolution timelines for the c-ares on Windows implementation?

@Falco20019
Copy link
Contributor Author

/CC @jtattermusch

@jtattermusch
Copy link
Contributor

GRPC_DNS_RESOLVER=ares will be the default resolver for v1.19.0.

Also, this issue now seems obsolete:

  • we are not planning to implement grpclb client in C#.
  • for opensource use, the plan is to implement a load balancing client that is compatible with xDS Envoy Universal Data API.

@lock lock bot locked as resolved and limited conversation to collaborators May 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants