grpc

golang grpc keepalive

折月煮酒 提交于 2021-02-12 05:43:52
最近遇到 grpc 客户端报错 rpc error: code = Unavailable desc = transport is closing ,原因是连接长时间没有使用,被服务端断开,这种情况通过简单粗暴的重试策略可以解决,更加优雅的解决方案是增加保持连接策略 服务端 var kaep = keepalive.EnforcementPolicy{ MinTime: 5 * time.Second, // If a client pings more than once every 5 seconds, terminate the connection PermitWithoutStream: true, // Allow pings even when there are no active streams } var kasp = keepalive.ServerParameters{ MaxConnectionIdle: 15 * time.Second, // If a client is idle for 15 seconds, send a GOAWAY MaxConnectionAge: 30 * time.Second, // If any connection is alive for more than 30 seconds, send a GOAWAY

How to bind Network Interface for C++ gRPC client

寵の児 提交于 2021-02-11 15:58:58
问题 Our system has an whitelist based on IP address to specify which gRPC client is allowed to connect. once before a new remote gRPC client join the network, the end user has to add its ip into the white list. Most time, it's easy for end user to know which NIC(ip) will be used by the gRPC client, but If there is too many NIC(ip) in the gRPC client node, it's hard for the end user to know which ip will be used before it's running, 'cause which NIC(ip) to be used is determine by the Linux system

gRPC-Node Error: Unexpected token u in JSON at position 0

蓝咒 提交于 2021-02-11 14:16:59
问题 So I keep getting this 'unexpected token u in JSON at position 0' error. I'm currently make a request from the main initiator which is making a gRPC request to customers gRPC server. When I don't containerize my files and manually npm install packages in each directory, it works smoothly. However, for some reason when I containerize my files, it has this issue. Usually this issue occurs with asynchronous requests (gRPC is async so makes sense), and I think they're racing to completion, but

Service Mesh对比:Istio与Linkerd

纵饮孤独 提交于 2021-02-11 05:39:28
根据CNCF的最新年度调查,很多组织对Service Mesh表现出很高的兴趣,并且有一部分已经在生产环境中使用它们。你可能不知道Linkerd是市场上第一个Service Mesh,但是Istio使Service Mesh更受欢迎。这两个项目都是最前沿的项目,而且竞争非常激烈,因此很难选择一个项目。 在本篇文章中,我们将和你一起了解Istio和Linkerd架构,组件,并比较它们的产品以帮助你做出明智的决定。 Service Mesh简介 在过去的几年中,微服务架构已成为软件设计中流行的样式。在这种架构中,我们将应用程序分解为可独立部署的服务。这些服务通常是轻量级的,多语言的,并且通常由各种职能团队进行开发部署。 当某些服务数量增加,难以管理且越来越复杂时,微服务架构将一直有效。但这也在管理安全性,网络流量控制和可观察性等各个方面带来了挑战。 Service Mesh可以很好地帮助应对这些挑战。 Service Mesh 用于描述组成应用程序的微服务及其之间的交互。随着服务数量的增加和复杂性的增加,扩展和管理变得越来越困难。Service Mesh可以为微服务架构提供服务发现,负载均衡,故障恢复,指标和监视。 Service Mesh 通常还能够满足更复杂的需求,例如A/B测试,金丝雀发布,速率限制,访问控制和端到端身份验证。 Service Mesh

How to fix None Exception iterating requests! issue

这一生的挚爱 提交于 2021-02-11 03:41:53
问题 I'm fresh in speech recognition topic I'm working on project in which I can find some usecases for Pepper bot in the workspace. Playing with Pepper we figured out some issues with it's speech recognition ability. I've found that we can try to connect it with external engines for that and I picked up DialogFlow from GCP. Also because I've found some integrations with this service. I've used code from this project import traceback from naoqi import qi # [START dialogflow_detect_intent_streaming

How to fix None Exception iterating requests! issue

余生长醉 提交于 2021-02-11 03:36:24
问题 I'm fresh in speech recognition topic I'm working on project in which I can find some usecases for Pepper bot in the workspace. Playing with Pepper we figured out some issues with it's speech recognition ability. I've found that we can try to connect it with external engines for that and I picked up DialogFlow from GCP. Also because I've found some integrations with this service. I've used code from this project import traceback from naoqi import qi # [START dialogflow_detect_intent_streaming

How to fix None Exception iterating requests! issue

。_饼干妹妹 提交于 2021-02-11 03:36:05
问题 I'm fresh in speech recognition topic I'm working on project in which I can find some usecases for Pepper bot in the workspace. Playing with Pepper we figured out some issues with it's speech recognition ability. I've found that we can try to connect it with external engines for that and I picked up DialogFlow from GCP. Also because I've found some integrations with this service. I've used code from this project import traceback from naoqi import qi # [START dialogflow_detect_intent_streaming

Failed to load native library grpc_csharp_ext.x86.dll while running Azure Function in Visual Studio

一笑奈何 提交于 2021-02-10 20:18:34
问题 lately I have encountered a following problem. Azure Function that is run in Visual Studio always throws an exception: System.IO.IOException HResult=0x80131620 Message=Error loading native library "C:\Users\\AppData\Local\AzureFunctionsTools\Releases\2.16.0\cli\grpc_csharp_ext.x86.dll" Source=Grpc.Core StackTrace: at Grpc.Core.Internal.UnmanagedLibrary..ctor(String[] libraryPathAlternatives) at Grpc.Core.Internal.NativeExtension.LoadUnmanagedLibrary() at Grpc.Core.Internal.NativeExtension

How to access request headers in grpc service proxied by. grpc-gateway in golang

混江龙づ霸主 提交于 2021-02-10 14:14:57
问题 I have a grpc server proxied by grpc-gateway. When I make a HTTP call to the gateway endpoint, my corresponding grpc service method is called. Now, the grpc service implementation receives a Context which has the headers. I couldn't figure out how to access the headers. When I debug my grpc service and put a breakpoint, this is the structure of the Context object which my service receives. Now, how can I get the value of any of the HTTP request headers? 回答1: HTTP headers are stored in

如何管理越来越多的Operator?OLM给你答案

本小妞迷上赌 提交于 2021-02-09 20:27:45
作者 | 匡大虎、阚俊宝 导读: OLM(Operator Lifecycle Manager) 作为 Operator Framework 的一部分,可以帮助用户进行 Operator 的自动安装,升级及其生命周期的管理。同时 OLM 自身也是以 Operator 的形式进行安装部署,可以说它的工作方式是以 Operators 来管理 Operators,而它面向 Operator 提供了声明式 (declarative) 的自动化管理能力也完全符合 Kubernetes 交互的设计理念。本文我们将来了解一下 OLM 的基本架构和安装使用。 OLM 组件模型定义 OLM 的出现是为了帮助没有如大数据,云监控等领域知识的用户能够自助式地部署并管理像 etcd、大数据分析或监控服务等复杂的分布式应用。因此从它的设计目标来说,OLM 官方希望实现面向云原生应用提供以下几个方向上的通用管理能力,包括: 生命周期管理:管理 operator 自身以及监控资源模型的升级和生命周期; 服务发现:发现在集群中存在哪些 operator,这些 operators 管理了哪些资源模型以及又有哪些 operators 是可以被安装在集群中的; 打包能力:提供一种标准模式用于 operator 以及依赖组件的分发,安装和升级; 交互能力:在完成了上述能力的标准化后,还需要提供一种规范化的方式(如 CLI