Questions tagged [grpc-python]

Python implementation of gRPC: A high performance, open source, general RPC framework that puts mobile and HTTP/2 first.

gRPC is an open source remote procedure call (RPC) system initially developed at Google. It uses HTTP/2 for transport, Protocol Buffers as the interface description language, and provides features such as authentication, bidirectional streaming and flow control, blocking or nonblocking bindings, and cancellation and timeouts.

gRPC Basics - Python

401 questions
0
votes
1 answer

How to do client side load-balancing with custom ThreadPool in gRPC?

I have created a grpc python client with round robin load-balancing policy self.channel = grpc.insecure_channel(self.host,options=[("grpc.lb_policy_name", "round_robin")]) Passed first…
0
votes
0 answers

grpc client in docker can't reach server on host

I have a node grpc-server running on localhost and my grpc-client is a python flask server. If the client also runs on localhost directly then everything works as intended. Once I host the client(flask server) in a docker-container it is unable to…
David
  • 116
  • 2
  • 10
0
votes
1 answer

I have a certificate and a private key on the client and on the server but gRPC secure connetion fails

I generated the certificate and the private key with openssl for the client and for the server, the code of both of them is in python and they have a communication gRPC for federated learning process. I tried to get the gRPC connection a secure…
LVZftm
  • 1
  • 2
0
votes
0 answers

gRPC keepalive not working on alibaba ACK

I've built some microservices using kubernetes and the pods communicate using gRPC. I've set keepalive settings on both client and server (copy and pasted the settings from here: https://cs.mcgill.ca/~mxia3/2019/02/23/Using-gRPC-in-Production/ ),…
0
votes
0 answers

Trouble connecting to a secure GRPC server on LAN

I have a Golang GRPC running on computer A. (Just for reference) func main() { //GRPC server setup. certFile := "ssl/server.crt" keyFile := "ssl/server.pem" creds, err := credentials.NewServerTLSFromFile(certFile, keyFile) opts :=…
0
votes
1 answer

Failure to implement a Client Streaming to Server Python code

I just started with gRPC and it somewhat confuses me. I am trying to make a Client that streams to a Server and a Server that streams to the Client. I had success implementing Server streaming to Client but failing to do a Client streaming to the…
Pavel Zagalsky
  • 1,620
  • 7
  • 22
  • 52
0
votes
1 answer

GRPC Client Side Load Balancing: How to measure response time per target address?

I'm implementing a custom load balancer for GRPC to enable client side load balancing in my app. Due to business requirements I need to use a response time based metric in my load balancing algorithm. The problem is that GRPC Picker interface, which…
MagicMan
  • 21
  • 3
0
votes
1 answer

Python GRPC Client to remote server with different IP address

Is it possible to connect GPRC client in Python or any language to a remote server using DNS or an actual IP address?. If you can provide a code snippet that would be great.
0
votes
1 answer

Compiling protobuf messages using python plugin within Google Cloud Build

I've been dealing with this problem for several weeks now and am in dire need of help! So thanks in advance for any insight you might have into how to compile protobufs into pb2.py files such that they are accessible to the rest of your workspace…
0
votes
2 answers

Python client returns CERTIFICATE_VERIFY_FAILED on GRPC stub

I have this easy code to connect to download some data using GRPC creds = grpc.ssl_channel_credentials() channel = grpc.secure_channel(f'{HOST}:{PORT}', credentials=creds) stub = liveops_pb2_grpc.LiveOpsStub(channel=channel) request =…
mrc
  • 2,845
  • 8
  • 39
  • 73
0
votes
2 answers

Install GRPC from source for SELINUX 32bit

I have to install GRPC python from source as the target machine does not have internet connection. The target machine has python 3.7 and pip3 installed. Can anyone share the process how to do it. Thanks in advance
PMu
  • 11
  • 3
0
votes
0 answers

module 'grpc' has no attribute 'insecure_channel'

I am trying to do a connection through grpc using: import grpc import class def main(): channel = grpc.insecure_channel('localhost:50051') stub = class_pb2_grpc.ClassStub(channel=channel) list_data(stub) if __name__ == '__main__': …
mrc
  • 2,845
  • 8
  • 39
  • 73
0
votes
1 answer

Using GRPC python without internet access and pip install for custom Linux distro

I need to run a GRPC server on a custom Linux distro, which has no access to internet or python pip. Can anyone please provide some guidance how I can generate the cygrpc.cp37-win_amd64 file specific to the platform**[32bit custom Linux with Python…
PMu
  • 11
  • 3
0
votes
1 answer

Increasing GRPC message size is not working

I am sending a grpc message over 40 MB, I have set the limit of grpc message size both in client and server-side as follows to take 64 MB still I am getting size limit error? Client options = [('grpc.max_send_message_length', 64*1024*1024), …
0
votes
1 answer

pytest fails if I use cached gRPC Channel, only in multiple tests

Summary I'm making Client service that interacts with other MicroService Server. By using gRPC Channel, this client get some data from server. The connection is used frequently, and participants are fixed, so I reuse gRPC Channel and Stub to reduce…