服务端均衡负载 (文档 ID 460982.1)

(服务端均衡负载)How To Configure Server Side Transparent Application Failover (文档 ID 460982.1)
目的:
     不通过scan,实现服务端均衡负载




1.添加服务 (oracle 用户执行)
srvctl add service -d mtest -s jcservice -r "mtest1,mtest2" -P BASIC
--这里的mtest是database name,mtest1和mtest2 是instance name.


2.启动 jcservice 服务
srvctl start service -d mtest -s jcservice


3.检查 jcservice 运行状态


srvctl config service -d mtest

[oracle@rac1 ~]$ srvctl config service -d mtest
Service name: jcservice
Service is enabled
Server pool: mtest_jcservice
Cardinality: 2
Disconnect: false
Service role: PRIMARY
Management policy: AUTOMATIC
DTP transaction: false
AQ HA notifications: false
Failover type: NONE
Failover method: NONE
TAF failover retries: 0
TAF failover delay: 0
Connection Load Balancing Goal: LONG
Runtime Load Balancing Goal: NONE
TAF policy specification: BASIC
Edition: 
Preferred instances: mtest1,mtest2
Available instances: 




4.给service 添加参数


 execute dbms_service.modify_service 
  (
        service_name => 'jcservice',
        aq_ha_notifications => true,
        failover_method => dbms_service.failover_method_basic, 
        failover_type => dbms_service.failover_type_select, 
        failover_retries => 180 , 
        failover_delay => 5, 
        clb_goal => dbms_service.clb_goal_long
  ); 
  


service_name
The name of the service limited to 64 characters in the Data Dictionary


aq_ha_notifications
Determines whether HA events are sent via AQ for this service


failover_method
The TAF failover method for the service


failover_type
The TAF failover type for the service


failover_retries
The TAF failover retries for the service


failover_delay
The TAF failover delay for the service


clb_goal
Method used for Connection Load Balancing (see Table 95-2, "Constants used in Connection Balancing Goal Arguments")






  
5.确认参数


col name format a15 
col failover_method format a11 heading 'METHOD' 
col failover_type format a10 heading 'TYPE' 
col failover_retries format 9999999 heading 'RETRIES' 
col goal format a10 
col clb_goal format a8 
col AQ_HA_NOTIFICATIONS format a5 heading 'AQNOT' 
select name, failover_method,failover_type, failover_retries,goal, clb_goal,aq_ha_notifications from dba_services where NAME = 'jcservice'; 


6.检查service


lsnrctl services


7.实现服务端均衡负载


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7569309/viewspace-2146120/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/7569309/viewspace-2146120/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
服务负载均衡和客户负载均衡是两种不同的负载均衡方式。 服务负载均衡是指通过一台独立的负载均衡服务器来接收客户的请求,并根据负载均衡算法将请求分发给后的应用服务器。这种方式需要额外的负载均衡服务器来进行请求分发。客户发送请求后,负载均衡服务器会选择一个合适的后服务器来处理请求。常见的服务负载均衡实现方式有硬件负载均衡和软件负载均衡。硬件负载均衡使用专用设备(如F5、Array等),而软件负载均衡使用软件(如LVS、Nginx等)来实现。 客户负载均衡是指在分布式系统中,客户自己负责选择合适的后服务器来处理请求,而不需要额外的负载均衡服务器。客户首先从注册中心(如Eureka Server)获取服务列表,然后根据负载均衡算法选择一个服务。常见的客户负载均衡实现方式是使用Ribbon。在客户负载均衡中,消费者通过restTemplate远程调用触发Ribbon的负载均衡策略,选择一个可用的服务提供者来处理请求。 所以,服务负载均衡和客户负载均衡的主要区别在于负载均衡的位置和流程。服务负载均衡需要一台独立的负载均衡服务器来进行请求分发,而客户负载均衡是通过客户自己的负载均衡算法来选择后服务器处理请求,不需要额外的负载均衡服务器。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [服务负载均衡和客户负载均衡](https://blog.csdn.net/weixin_55189228/article/details/125568795)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *3* [服务负载均衡和客户负载均衡(Ribbon)的区别](https://blog.csdn.net/qq_42039738/article/details/105515996)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值