Hi.

I am new at this too, but I will attempt an answer. gRPC exists primarily 
as a protocol. There are 3 main implementations, C/C++, Go and Java. Each 
of these has its own repo. API's are somewhat close but also vary by 
language so they are idiomatic - and to be honest, the APIs aren't the grpc 
'contract' - the protocol is. 

The C/C++ repo serves as the 'core' by which ancillary languages can call 
down into, for example Node & C#. Even within the C/C++ repo, things can 
depend on your platform of choice - right now Linux can provide client-side 
balancing by virtue of the fact that it uses C-ARES for DNS resolution. On 
Windows, the core currently only supports the platform DNS resolver. 

So - if you are running Node on Linux, I think you are in luck. You can 
use: 'dns://youdnsserver/yourservice' when you create the channel. If your 
DNS sever returns a SRV record with multiple IP address, the channel will 
take care of balancing across them. This also means that if you are using 
something like Consul to be your DNS server you may do some form of 
"service discovery" using the 'yourservice' portion of the address you pass 
- which may be used to do some form of querying against the pool of 
services it knows about.

Myself, I am on Windows and very much waiting in anticipation for the 
C-ARES resolver to make it to the Windows platform so I can do just as I 
described above. Last I heard it was due 'early Q1 2018' and I havent been 
able to get this verified this year.

Its also worth mentioning that you can write native plugins for the C/C++ 
library to load to write your own logic to do these things. Again, I am not 
sure where this is, I have a feeling its still a TODO.

Bear in mind this answer is "to the best of my knowledge" and might well be 
way off :-)

 

On Saturday, 10 February 2018 16:36:19 UTC+1, peter....@jumpcloud.com wrote:
>
> Envoy is interesting, although I found it hard to configure; a proxy 
> alternative is https://nghttp2.org/documentation/index.html which is less 
> frills but much easier to setup imo.
>
> However, those are both proxy solutions whereas grpc is supposed to have 
> client-side LB mechanism built in (https://grpc.io/blog/loadbalancing), 
> which is what the Java example earlier about is; it'd be pretty useful to 
> have a node.js example of how to use consul, or zookeeper or something akin 
> and how to hook into it. 
>
> On Monday, February 5, 2018 at 10:55:03 PM UTC-7, maju...@gmail.com wrote:
>>
>> Envoy <https://www.envoyproxy.io> is what you want, which is written in 
>> C++ and could also handle logging, tracing, and etc. as sidecar.
>>
>> On Wednesday, August 10, 2016 at 1:51:53 AM UTC+8, raut...@gmail.com 
>> wrote:
>>>
>>> Hi
>>>
>>> While going through gRPC goals on grpc.io I noticed it mentions Load 
>>> balancing as one of its design principles or Goals.
>>>
>>> But I did not find anything which suggests the same.
>>>
>>> Saw one of the gRPC Demos by Sameer Ajmani on Youtube and he appears to 
>>> be running some kind of a Server Proxy(some yaml file suggested this).I may 
>>> be wrong.
>>>
>>> So, my question is how is this Load Balancing goal achieved by gRPC if I 
>>> have to use a TCP or HTTP Load balancer Proxy to achieve this?
>>>
>>> As I understands gRPC server stubs need to run on each and every System 
>>> providing the Service(s), but what does client need to do if Servers are 
>>> not behind a Proxy?
>>>
>>> As I understand gRPC does not have a Service Discovery mechanism, hence 
>>> the confusion.
>>>
>>> Could someone please point me to the right direction?
>>>
>>> PS:- I am a newbie to gRPC, pardon my ignorance. Would appreciate if 
>>> someone can CMIIW.
>>>
>>> Thanks,
>>>
>>

-- 
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 grpc-io+unsubscr...@googlegroups.com.
To post to this group, send email to grpc-io@googlegroups.com.
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/c936c496-67e2-4fa0-9c1d-5fff47ffeb25%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to