Re: [grpc-io] Re: Does gRPC use only http2? tcpdump from a particular client does not show it as http2

2018-11-29 Thread prammadevi
Thanks. On Friday, November 30, 2018 at 6:17:56 AM UTC+5:30, Srini Polavarapu wrote: > > >> What does grpc rely on to for http2 capability? (any tool in os >> environment or http2 capability is inbuilt in grpc?) >> > > gRPC Python has a built-in HTTP/2 stack. > > > On Thursday, November 29,

Re: [grpc-io] Re: Does gRPC use only http2? tcpdump from a particular client does not show it as http2

2018-11-29 Thread prammadevi
Thanks for writing. Same tool i am using for capturing and viewing 2 dumps, 1 dump it shows http2 where as this dump it shows application protocol. Looking at other replies and going thru other documents, i hope grpc cannot work without http2. But my issue is at least half of the time, after

[grpc-io] Greetings from gRPC!

2018-11-29 Thread 'April Kyle Nassi' via grpc.io
Hi everyone! Due to the holidays and other commitments, it's been a while since we had a gRPC community call and I wanted to quickly update you on some things in the works. - If you're in the SF Bay Area, we'd love to have you join us next week on the 5th for a Meetup in SF! Ryan Michela

[grpc-io] Re: Repeated blog article rss feed

2018-11-29 Thread alan0098
Thanks for your suggestion, issued . On Friday, November 30, 2018 at 3:08:05 AM UTC+8, Carl Mastrangelo wrote: > > I believe the RSS feed is from github.io, so you may need to file a bug > there. I have emailed them in the past (their email is

Re: [grpc-io] libgrpc++: Enabling debug trace on Android

2018-11-29 Thread 'Michael Lumish' via grpc.io
Have you tried "GRPC_VERBOSITY=DEBUG"? Our environment variables are unfortunately case-sensitive with varying casing conventions On Thu, Nov 29, 2018 at 4:18 PM David Collins wrote: > Hi all, > > I have cross-compiled version 1.17.0 of the libgrpc++ library for the > Android platform. When I

Re: [grpc-io] Re: Does gRPC use only http2? tcpdump from a particular client does not show it as http2

2018-11-29 Thread 'Srini Polavarapu' via grpc.io
> > > What does grpc rely on to for http2 capability? (any tool in os > environment or http2 capability is inbuilt in grpc?) > gRPC Python has a built-in HTTP/2 stack. On Thursday, November 29, 2018 at 10:13:27 AM UTC-8, Josh Humphries wrote: > > The main gRPC libraries *only* use HTTP/2. As

[grpc-io] libgrpc++: Enabling debug trace on Android

2018-11-29 Thread David Collins
Hi all, I have cross-compiled version 1.17.0 of the libgrpc++ library for the Android platform. When I link against this library in a test program for Android, the program runs successfully, but I can't view the extra logs and traces to debug. Specifically, I have tried

[grpc-io] Re: Measuring gRPC-Java Unary Client Requests Latency From Interceptor

2018-11-29 Thread 'Carl Mastrangelo' via grpc.io
System.currentTimeMillis() is not ideal for measuring elapsed time. It's meant for measure the current time. Instead, try doing: long startNanos = System.nanoTime(); // ... Do the RPC long stopNanos = System.nanoTime(); tick("GrpcClient.Get", TimeUnit.NANOSECONDS.toMillis(stopNanos -

[grpc-io] Re: java LB round-robin has 30 minutes blank window before re-resolve

2018-11-29 Thread eleanore . jin
Hi Carl, Thanks for the reply: 1. how do I kill the instances: docker stop the container of the gRPC server. is this what you meant by 'pull the plug?' 2. when you say: DNS is pull based, so we implemented as a timer based refresh, but it isn't desirable, so you mean the DNS refresh will be

[grpc-io] Re: Measuring gRPC-Java Unary Client Requests Latency From Interceptor

2018-11-29 Thread Yee-Ning Cheng
I also have a metric that surrounds the actual blocking call (I am using the blocking stub in this case). Long time = System.currentTimeMillis(); Userprofile.ReadResponse resp = blockingStub .withDeadlineAfter(timeout, TimeUnit.MILLISECONDS) .get(req.build());

[grpc-io] Re: Fail over takes too long because of TCP retransmission

2018-11-29 Thread 'Carl Mastrangelo' via grpc.io
The main way we solve this is by enabling client side keep-alives, which IIRC run once every 45 second if there are no active RPCs. These are implemented in gRPC as HTTP/2 Ping frames. I can't say I know where this is for Go, but in Java this is an actively used feature. On Monday, November

[grpc-io] Re: Binlog as a gRPC service?

2018-11-29 Thread 'Carl Mastrangelo' via grpc.io
I'm not sure that there is a service in mind, but it would need some sort of special treatment if it did exist. (i.e. do binlog gRPCs themselves get logged?) Also, what happens if the log service hangs, gets backed up, or is unreachable? On Wednesday, November 28, 2018 at 5:22:43 AM UTC-8,

[grpc-io] Re: java LB round-robin has 30 minutes blank window before re-resolve

2018-11-29 Thread 'Carl Mastrangelo' via grpc.io
Responses inline On Wednesday, November 28, 2018 at 2:23:13 PM UTC-8, eleano...@gmail.com wrote: > > Here is the test case: > > I have implemented my custom NameResolver, and using RoundRobinLoadBalancer > in managedChannelBuilder. > > 1. initially has 4 instances running (serverA, serverB,

[grpc-io] Re: gRPC over the internet at scale

2018-11-29 Thread 'Carl Mastrangelo' via grpc.io
I can't speak for most middle boxes, but at least nginx does have pretty good http2 support. I believe that is pretty common. The main issue I see with middle boxes is not supporting TLS ALPN (which HTTP/2 depends on). This is common in packet inspecting firewalls, which lag in

[grpc-io] Re: [java] - gRPC ThreadPoolExecutor and bounded queue

2018-11-29 Thread 'Carl Mastrangelo' via grpc.io
I would modify the counters before calling super (in case they throw an exception). Also, I (personally), would fail the RPCs early rather than doing resize of the pool. You can invoke call.close(Status.CANCELED), and then return a noop listener, instead of invoked methods on next. On

[grpc-io] Re: Measuring gRPC-Java Unary Client Requests Latency From Interceptor

2018-11-29 Thread 'Carl Mastrangelo' via grpc.io
That is one way. For more precise (but about as accurate) numbers, consider using a ClientStreamTracer, which you can set on the ManagedChannelBuilder. That has more fine-grained events about an RPC. On Wednesday, November 28, 2018 at 1:55:12 PM UTC-8, Yee-Ning Cheng wrote: > > I am trying

[grpc-io] Re: [java] - gRPC ThreadPoolExecutor and bounded queue

2018-11-29 Thread info
Thank you Carl. Is something like this what you meant? I striped out the resizing logic... activeCalls is an AtomicInteger @Override public ServerCall.Listener interceptCall(ServerCall call, Metadata headers, ServerCallHandler next) { resizePool(activeCalls.incrementAndGet());

Re: [grpc-io] Thread configuration for low latency in high throughput scenario

2018-11-29 Thread 'Carl Mastrangelo' via grpc.io
+1 To what Robert said. You have a couple options here: * use ForkJoinPool, which scales much more gracefully under load. * If your RPC logic is pretty simple, and does not block (like, ever), you can use directExecutor() on the server builder and run RPCs inline. This avoids the need

[grpc-io] Re: Executing the client's send message in a separate thread?

2018-11-29 Thread 'Carl Mastrangelo' via grpc.io
Are you using Netty? If so, you can set a direct executor (using MoreExecutors.directExecutor()).For the outbound path it will involve a thread hop (see WriteQueue), but for inbound it will not. If you respond to RPCs directly on the thread that receives them, then there is no thread

[grpc-io] Re: Repeated blog article rss feed

2018-11-29 Thread 'Carl Mastrangelo' via grpc.io
I believe the RSS feed is from github.io, so you may need to file a bug there. I have emailed them in the past (their email is on the GitHub contact page), and they have been helpful to me in the past. On Tuesday, November 27, 2018 at 5:46:17 PM UTC-8, alan...@gmail.com wrote: > > Hi there, >

[grpc-io] Re: Recommended gRPC URI scheme

2018-11-29 Thread 'Carl Mastrangelo' via grpc.io
Hi Jakob! gRPC has it's own name resolution built into it's own URLs, so it may get confusing. For example, a dns based gRPC service would be dns:///localhost:9988 . Note the actual address info is in the /path/ of the URI, rather than the host or authority. For domain socket based

[grpc-io] Re: [java] - gRPC ThreadPoolExecutor and bounded queue

2018-11-29 Thread 'Carl Mastrangelo' via grpc.io
You *really* don't want to limit the queue size. The queue is not per RPC, but per RPC callback event. If the enqueue'd callback (like headers received, data received, cancellation, etc.) gets dropped, the RPC will be in a zombie state and never able to finish or die. Additionally, if you

Re: [grpc-io] Re: Does gRPC use only http2? tcpdump from a particular client does not show it as http2

2018-11-29 Thread Josh Humphries
The main gRPC libraries *only* use HTTP/2. As you saw, they negotiate the same protocol during NPN step of TLS handshake: "h2". It is more likely that whatever analysis tool you used in the first case did not recognize "h2" as the HTTP/2 protocol, so treated it as an unknown application protocol.

[grpc-io] [java] - gRPC ThreadPoolExecutor and bounded queue

2018-11-29 Thread info
Hi everyone, Our gRPC server runs on a ThreadPoolExecutor with a corePoolSize of 4 and a maximumPoolSize of 16. In order to have the pool size increase, we provide a BlockingQueue with a bounded size of 20. Sometimes short bursts happen and we're perfectly fine with dropping requests at

[grpc-io] Re: grpc reconnect

2018-11-29 Thread shafathhusain
Thanks Li, That helped. On Thursday, 29 November 2018 00:27:37 UTC+5:30, Menghan Li wrote: > > You can set a custom dialer ( > https://godoc.org/google.golang.org/grpc#WithDialer). This dialer is > called to create new connections. > -- You received this message because you are subscribed to

[grpc-io] Recommended gRPC URI scheme

2018-11-29 Thread 'Jakob Buchgraber' via grpc.io
Hi, in our project we want to allow a user to specify a URI to a service endpoint via a flag. We support multiple protocols for talking to service endpoints, including gRPC. The current plan is to select the protocol to use based on the scheme component of the URI. Do you provide any guidance