当前位置:网站首页>阿里云配置SLB(负载均衡)实例
阿里云配置SLB(负载均衡)实例
2022-06-10 23:28:00 【文晓武】
ECS实例复制完成后,在支持多可用区的地域创建负载均衡SLB实例,用于跨可用区挂载ECS实例,扩展应用系统对外服务能力、消除单点故障,提升应用系统的可用性。本文介绍SLB实例的部署方法。
前提条件
- 已复制三台ECS实例。更多信息,请参见复制ECS实例。
- 四台ECS实例的Web服务均已启动并正常运行。
注意 若Web服务未运行,则SLB实例与ECS实例之间无法正常通信。
操作步骤
- 创建SLB实例。具体操作,请参见创建实例。本教程使用的配置如下:
- 地域:必须与ECS实例位于同一地域。
- 可用区类型:选择多可用区。
- 实例类型:选择私网。
- 网络类型:选择专有网络。
- 主可用区和备可用区:按需配置。

- 将源实例的公网IP转换为弹性公网IP。具体操作,请参见专有网络类型ECS公网IP转为弹性公网IP。
说明 为避免影响业务,需保证源实例IP地址不变。因此,需要先将源实例的公网IP转换为弹性公网IP,与源实例解绑后,再将其绑定至高可用版SLB实例上。

- 解绑源实例与弹性公网IP。
- 在源实例的IP地址列,单击弹性IP地址链接。

- 在弹性公网IP页面,单击解绑。

- 单击确定。更多信息,请参见解绑EIP。
- 在源实例的IP地址列,单击弹性IP地址链接。
- 绑定弹性公网IP至SLB实例。
- 在弹性公网IP页面,找到与源实例解绑后的弹性公网IP。

- 在操作列,单击绑定。
- 实例类型选择SLB实例,SLB实例选择刚创建的SLB实例,单击确定。更多信息,请参见绑定SLB实例。
- 在弹性公网IP页面,找到与源实例解绑后的弹性公网IP。
- 配置SLB实例。具体操作,请参见配置实例。
基本配置如下:
- 在协议&监听页签,完成以下配置。
- 负载均衡协议:选择TCP。
- 监听端口:输入
80。 - 调度算法:按需选择。本教程选择轮询。
- 其他配置使用默认值。

- 单击下一步。在后端服务器页签,选择默认服务器组,单击继续添加添加ECS实例。

- 勾选源实例和已复制的三台ECS实例,单击下一步:配置权重和端口号。端口配置为80,其他值保持默认,单击下一步。

- 在健康检查页签,使用默认值,单击下一步。
- 在配置审核页签,核对信息后,单击提交。
- 单击确定,返回实例管理页面,单击
。当健康检查状态为正常时,表示后端ECS实例可以正常处理负载均衡转发的请求了。
说明 健康检查需要几分钟时间,请您耐心等待并单击刷新图标查看状态。
- 在协议&监听页签,完成以下配置。
执行结果
为方便测试,本教程分别在四台ECS实例上搭建了静态网页,以标识每台ECS实例。在浏览器中输入负载均衡实例的服务地址,测试负载均衡服务。由于调度算法为轮询,请求会轮流发往每台ECS实例。

边栏推荐
- 百度飞桨PaddlePaddle最新系列AI课程回放地址
- B 树的简单认识
- The mystery of number idempotent and perfect square
- What is thread in concurrent programming
- array_ column() expects parameter 1 to be array, array given
- [network planning] 2.5 brief introduction to P2P architecture
- 452. detonate the balloon with the minimum number of arrows
- Excel单元格
- 微信小程序实现OCR扫描识别
- [go language learning] - Concurrent Programming
猜你喜欢

On the quality assurance system of youzan search V2021

Unity自定义文件夹图标颜色 个性化Unity编译器

Blog recommendation | building IOT applications -- Introduction to flip technology stack

Njuptn Nanyou Discrete Mathematics_ Experiment 4

String time sorting, sorting time format strings
![[network planning] 2.2.3 user server interaction: cookies](/img/a8/74a1b44ce4d8b0b1a85043a091a91d.jpg)
[network planning] 2.2.3 user server interaction: cookies

Unity mesh patch generates parabola and polyline

Unity custom folder icon color personalized unity compiler

MP framework basic operation (self use)

Volatile keyword for concurrent programming
随机推荐
[network planning] 1.5 seven layer network model and five layer network model
[JVM] thread
快手处置超过5.4万个违规账号:如何打击平台上的违规账号
ts+fetch实现选择文件上传
Review of software architecture in Harbin Institute of technology -- LSP principle, covariance and inversion
[JVM] class loading mechanism
[JVM] memory model
What are absolute and relative paths, and what are their advantages and disadvantages?
Volatile keyword for concurrent programming
网络工程师必修课防火墙安全区域及安全策略基础操作
Kubeflow 1.2.0 installation
Njupt South Post collection_ Experiment 2
Shengteng AI development experience based on target detection and identification of Huawei cloud ECS [Huawei cloud to jianzhiyuan]
452. detonate the balloon with the minimum number of arrows
Detailed decomposition of the shortest path problem in Figure
B 树的简单认识
How word inserts a guide (dot before page number) into a table of contents
飞利浦 COO 人事变动,将临危受命解决“供应链和产品召回”双重危机
对象作为点(Objects as Points) 个人总结
MP framework basic operation (self use)








