当前位置: 首页 > news >正文

中山网站建设案例浙江疫情最新消息

中山网站建设案例,浙江疫情最新消息,男女做暖网站,网站推广运营公司上篇文章在做 整合K8sSpringCloudK8sSpringBootgRpc 时,发现K8s中使用gRpc通信,负载均衡功能失效查了下gRpc的最佳实践,找到这里Load balancingSome load balancers dont work effectively with gRPC. L4 (transport) load balancers operate…

上篇文章在做 整合K8s+SpringCloudK8s+SpringBoot+gRpc 时,发现K8s中使用gRpc通信,负载均衡功能失效

查了下gRpc的最佳实践,找到这里

Load balancing

Some load balancers don't work effectively with gRPC. L4 (transport) load balancers operate at a connection level, by distributing TCP connections across endpoints. This approach works well for loading balancing API calls made with HTTP/1.1. Concurrent calls made with HTTP/1.1 are sent on different connections, allowing calls to be load balanced across endpoints.

Because L4 load balancers operate at a connection level, they don't work well with gRPC. gRPC uses HTTP/2, which multiplexes multiple calls on a single TCP connection. All gRPC calls over that connection go to one endpoint.

There are two options to effectively load balance gRPC:

  • Client-side load balancing

  • L7 (application) proxy load balancing

Note

Only gRPC calls can be load balanced between endpoints. Once a streaming gRPC call is established, all messages sent over the stream go to one endpoint.

Client-side load balancing

With client-side load balancing, the client knows about endpoints. For each gRPC call, it selects a different endpoint to send the call to. Client-side load balancing is a good choice when latency is important. There's no proxy between the client and the service, so the call is sent to the service directly. The downside to client-side load balancing is that each client must keep track of the available endpoints that it should use.

Lookaside client load balancing is a technique where load balancing state is stored in a central location. Clients periodically query the central location for information to use when making load balancing decisions.

For more information, see gRPC client-side load balancing.

Proxy load balancing

An L7 (application) proxy works at a higher level than an L4 (transport) proxy. L7 proxies understand HTTP/2, and are able to distribute gRPC calls multiplexed to the proxy on one HTTP/2 connection across multiple endpoints. Using a proxy is simpler than client-side load balancing, but can add extra latency to gRPC calls.

There are many L7 proxies available. Some options are:

  • Envoy - A popular open source proxy.

  • Linkerd - Service mesh for Kubernetes.

  • YARP: Yet Another Reverse Proxy - An open source proxy written in .NET.

上面也给出了解决方案,我们采用第二种 Linkerd 来做,这是个Service Mesh的一个实现,类似于Istio,但要比Istio更轻量级,我们这里只是选择一个代理而已,之后可能会集成Trace和监控的功能,所以功能上不用太丰富,而是要简单轻量,还要快,毕竟是代理嘛。

一、安装Linkerd

https://linkerd.io/2.12/getting-started/

安装完成之后会自动打开 dashboard

二、把应用交给Linkerd 托管

kubectl get deploy service-consumer -n service-k8s-demo -o yaml \| linkerd inject - \| kubectl apply -f -kubectl get deploy service-provider -n service-k8s-demo -o yaml \| linkerd inject - \| kubectl apply -f -

三、我这里有两个服务 service-consumer 和 service-provider,每个服务都有3个副本,再测试下负载均衡,发现已经生效了。

http://www.wangmingla.cn/news/112569.html

相关文章:

  • 整套网站模板下载seo搜索引擎优化是什么
  • cpa自己做网站安卓优化大师app
  • 网站建设商务软文写作是什么意思
  • 西安网站建设南京seo推广优化
  • 查询做导员的网站软文代写公司
  • 废旧网站那个做的最好如何对seo进行优化
  • 动态logo在线制作厦门百度整站优化服务
  • phpcms v9网站模板合肥网站设计
  • 仿豆瓣 wordpress深圳seo技术
  • 深圳做微信网站设计广州谷歌推广
  • 阜宁做网站的公司在线优化工具
  • 门户网站建设相关需求北京seo运营推广
  • 国外刺绣图案设计网站网络市场的四大特点
  • 广州网站推广手机免费建站系统
  • 公司产品网站应该怎么做如何在各大平台推广
  • 广州网站建设app开发谷歌优化seo
  • 网站图片怎么做alt新手销售怎么和客户交流
  • 凡科网站建设完成下载下载器手机做网页的软件
  • 河北省建设厅报名网站国外比较开放的社交软件
  • 香港服务器网站推广网站建设多少钱
  • 网站推荐界面电商培训内容有哪些
  • 网站备案级别网络推广外包业务销售
  • 公司建设网站怎么做账网络营销与直播电商专业就业前景
  • 为什么打开网站是建设中河北网络科技有限公司
  • 网站检索功能怎么做呢网络推广与优化
  • 苏州园区一站式服务中心今天的新闻最新消息
  • 广西送变电建设公司铁塔厂网站网站推广app
  • 黑龙江省道路建设网站百度游戏排行榜风云榜
  • 网站搜索引擎优化推广软件开发培训多少钱
  • 电商平台网站制作itme收录优美图片官网