关闭

TAF与负载均衡

395人阅读 评论(0) 收藏 举报
分类:
(1) Client Side Connect-Time Load Balance (客户端连接时负责均衡配置)

The client load balancing feature enables clients to randomize connection requests among the listeners.

Tnsnames Parameter: LOAD_BALANCE

load_balance的值可以设置为:on | off | yes | no | true | false

load_balance=yes|on|true 设置为客户端随机在所提供的listener address中根据Load选择最适合的listener。

load_balance=no|off|false 设置为客户端在所提供的listener address中按次序选择listener,一直到选择到可以连接的Listener。


The (load_balance=yes) instructs SQLNet to progress through the list of listener addresses in a random sequence, balancing the load on the various listeners. When set to OFF, instructs SQLNet to try the addresses sequentially until one succeeds.

Load balancing can be specified for an ADDRESS_LIST or associated with a set of ADDRESSes or set DESCRIPTIONs.

This parameter must be correctly coded in your net service name (connect descriptor).

By default, this parameter is set to ON for DESCRIPTION_LISTs.

This can even be achieved with a single net service name provided you configure
a) Multiple listener addresses within a description
b) Multiple descriptions within a description list
The difference between the two is that while the former will use the same connect data for all the listener addresses, that latter may have separate connect data for each configured listener address. Below, I provide an example of both types of configuration:
Multiple Listener addresses within a description:


load_balance默认值为on


If you use ADDRESS_LIST, (load_balance=yes) should be within the (ADDRESS_LIST=) portion. If you do not use ADDRESS_LIST, (load_balance=yes) should be within the (description=) portion.

(2) Client Side Connect-Time failover(客户端连接时故障切换配置)

连接到初始监听失败时,会自动切换到下一个监听进行重试。

The connect-time failover enables clients to connect to another listener if the initial connection to the first listener fails. The number of listener protocol addresses determines how many listeners are tried. Without connect-time failover, Oracle Net attempts a connection with only one listener. The default is on.

Tnsnames Parameter: FAILOVER

(failover=on) is default for ADDRESS_LISTs, DESCRIPTION_LISTs, and a set of

DESCRIPTIONs., therefore, you do not have to specify it explicitly. 



(3) Server Side Listener Connection Load Balance(服务端监听连接负载均衡)

The listener connection load balancing feature improves connection performance by balancing the number of active connections among multiple dispatchers and instances. In a single-instance environment, the listener selects the least loaded dispatcher to handle the incoming client requests. In an Oracle Real Application Clusters (RAC) environment, connection load balancing also has the capability to balance the number of active connections among multiple instances.
1. Least-loaded node
2. Least-loaded instance
3. Least-loaded dispatcher for that instance (in case of Shared server configuration)


There are two types of server-side load balancing:

Load Based — Server side load balancing redirects connections by default depending on node load. From 10.2 onwards you can work this with Load balancing advisory (LBA). This will not be effective for login storms as the connections are already in the listener after which PMON update on the load comes to the listener.
Session Based — Session based load balancing takes into account the number of sessions connected to each node and then distributes the connections to balance the number of sessions across the different nodes.
Session count balancing is used when you set a listener parameter, PREFER_LEAST_LOADED_NODE_<listener_name>=OFF (<listener_name> is the actual name of the listener which is different on each node in your cluster and by default is constructed as "listener_<nodename>"). Please be aware that connections bursts (large number of connections initiated very quickly one after another) may not be properly balanced due to statistics update latency. 


服务端监听连接负载均衡有2种类型:

基于负载,由PMON定期更新节点的负载情况,为客户端连接分配到较轻负载的监听上。

基于session数,选择session数少的节点监听进行连接,设置PREFER_LEAST_LOADED_NODE_<listener_name>=OFF即启用基于session数负载均衡连接。

值得注意的是,这两种负载均衡方式对于阻止连接风暴(即短时间内大量客户连接请求)来说都是无能为力的。



0
0

猜你在找
【直播】机器学习&数据挖掘7周实训--韦玮
【套餐】系统集成项目管理工程师顺利通关--徐朋
【直播】3小时掌握Docker最佳实战-徐西宁
【套餐】机器学习系列套餐(算法+实战)--唐宇迪
【直播】计算机视觉原理及实战--屈教授
【套餐】微信订阅号+服务号Java版 v2.0--翟东平
【直播】机器学习之矩阵--黄博士
【套餐】微信订阅号+服务号Java版 v2.0--翟东平
【直播】机器学习之凸优化--马博士
【套餐】Javascript 设计模式实战--曾亮
查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:139683次
    • 积分:2557
    • 等级:
    • 排名:第14329名
    • 原创:111篇
    • 转载:14篇
    • 译文:1篇
    • 评论:16条
    文章分类
    最新评论