当前位置:网站首页>微服务重点
微服务重点
2022-07-23 07:00:00 【LZYmarks】
Nacos注册中心
Nacos是阿里巴巴的产品,现在是SpringCloud中的一个组件。

一个服务可以有多个实例
Nacos就将同一机房内的实例 划分为一个集群。
也就是说,user-service是服务,一个服务可以包含多个集群,如杭州、上海,每个集群下可以有多个实例,形成分级模型
微服务互相访问时,应该尽可能访问同集群实例,因为本地访问速度更快。当本集群内不可用时,才访问其它集群。
同集群优先的负载均衡
5.4.权重配置
实际部署中会出现这样的场景:
服务器设备性能有差异,部分实例所在机器性能较好,另一些较差,我们希望性能好的机器承担更多的用户请求。
但默认情况下NacosRule是同集群内随机挑选,不会考虑机器的性能问题。
因此,Nacos提供了权重配置来控制访问频率,权重越大则访问频率越高。
在nacos控制台,找到user-service的实例列表,点击编辑,即可修改权重:
注意:如果权重修改为0,则该实例永远不会被访问
Nacos与Eureka的区别


边栏推荐
- Don't be silly to distinguish these kinds of storage volumes of kubernetes
- Probability meditation: 2. The quantitative rules
- 【可視化調度軟件】上海道寧為SMB組織帶來NETRONIC下載、試用、教程
- Point target simulation of SAR imaging (I) -- mathematical model
- Smart city infrastructure management based on bim+3dgis
- 做测试如何应对新的开发模式?
- About this pointer
- 同花顺开户风险性大吗,安全吗?
- Knowledge map: basic concepts
- 第二章关系数据库课后习题
猜你喜欢

SparkSQL设计及入门,220722,

欧洲“气荒”对中国有哪些影响?

离屏渲染 &FBO

The current situation of the industry is disappointing. After working, I returned to UC Berkeley to study for a doctoral degree
![[graphics] ASTC texture compression format](/img/d1/734fe91d56716c610980696a8e0d06.png)
[graphics] ASTC texture compression format

Why choose AMD epyc for cloud solutions?

"100 Android interview questions" I brushed angrily for Dachang

中国在又一个新兴科技领域领先美国,站在科技创新制高点

Charles抓包工具测试实战

docker redis
随机推荐
Wu Enda machine learning series p31~p42
【MUDUO】EPOLLPOLLER事件分发器
【记录】golang跨平台编译
轻重链剖分/树链剖分
魔兽地图编辑器触发器笔记
Remote editing and debugging with vscode
数据库系统原理与应用教程(051)—— MySQL 查询(十三):DML 语句中使用查询
数据库系统原理与应用教程(038)—— MySQL 的索引(四):使用 EXPLAIN 命令分析索引
Day 8 notes
Shell运算符、$((运算式))” 或 “$[运算式]、expr方法、条件判断、test condition、[ condition ]、两个整数之间比较、按照文件权限进行判断、按照文件类型进行判断
Google Play应用商店可能会删除应用权限概述 转而使用新的数据安全信息组合
Day 10 notes
keepalived双机热备
反常积分的审敛
中国在又一个新兴科技领域领先美国,站在科技创新制高点
Jupyter notebook add existing virtual environment
Smart canteen data analysis system
【 Visual Dispatching Software】 Shanghai Dow Ning apporte netronic download, Trial, tutoriel pour l'Organisation SMB
Talking about the CPU type of anroid device and the placement directory of so files
Introduction to radar part vii 4 SAR system design