SAP 接口 inbound (SAP CALL JAVA ) 负载均衡说明

关键字:RFC JCO inbound 、outbound

关于SAP和oracle技术资料对于RFC JCO inbound 、outbound 特别说明:

一、ORACLE的资料显示(Integration Adapter for SAP R/3 User's Guide for Oracle WebLogic Server 12c Release (12.2.1.3.0) E84122-01 第11页) :

 inbound :SAP CALL JAVA 

outbound :JAVA CALL SAP

The Adapter for SAP is used for the integration of Oracle products with SAP Enterprise to exchange the real-time data. It is developed in the Oracle JCA framework. It is based on the SAP Java Connector 3.0 (SAP JCo) and is used for the inbound and outbound interaction with SAP using message types RFC/BAPI/IDOC.

▪ Inbound interaction: When an SAP R/3 system triggers an event and the event is listened by an application using Adapter for SAP as a result of which the application receives SAP R/3 data, the interaction is termed as Inbound interaction.
▪ Outbound interaction: When an application uses the Adapter for SAP to invoke an SAP R/3 business object or business operation, the interaction is termed as Outbound interaction.

二、SAP的资料解释(SAP Java Connector):

The SAP Java Connector (SAP JCo) is a development library that enables a Java application to communicate with on-premise SAP systems via SAP's RFC protocol. It combines an easy-to-use API with unprecedented flexibility and performance. The SAP JCo supports both communication directions: inbound Remote Function Calls (Java calls ABAP) as well as outbound Remote Function Calls (ABAP calls Java).

inbound:Java calls SAP

outbound:SAP calls Java

三、前面文章讲过 SAP和外围系统接口有2中方式:

一、inbound  (SAP CALL JAVA 、.net)

二、outbound  (JAVA 、.net  CALL  SAP)

本文重点讲述难度高的 inbound  (SAP CALL JAVA 、.net),这种方式的负载均衡情况。

SAP接口程序把数据传给外围系统,通过语法 CALL FUNCTION 'XXX' DESTINATION 'YYY_GATEWAY'

这个YYY_GATEWAY 是,SAP内部的MessageServer:

当多个外围的服务器连接到SAP后,每一个服务器都会有一个长连接:

比如下图有3个长连接连接到了SAP开发服务器,你可以把三个长连接,理解为三条路。

那么, SAP的MessageServer(GateWay)是怎么控制一个SAP内部的接口输出数据,走哪一条路到达外围系统呢(负载均衡)?

下面这段说明,来自Oracle SOA中间件:《Oracle® Fusion Middleware Application Adapters Application Adapter for SAP R/3 (SAP JCo 3.0) User's Guide for Oracle WebLogic Server  ,12c Release 1 (12.1.3.0.0) 》 

3.5.3 Load Balancing SAP Configuration 

In cases where a large amount of traffic on a particular RFC destination is required, increase the thread output size in SAP and increase the thread count and try and keep the ratio of Gateway threads to server threads at the same 1:3 ratio. For example, if the Gateway has 3 active threads for destination "X", on the outbound server channel side, the server thread count is now 9. 

In addition to Gateway load balancing, the amount of SAP Gateway threads can be increased. For more information, consult your SAP R/3 system administrator. When more than one Program ID with the same name is registered for one SAP Gateway (using a separate JVM), the Gateway can be enabled for a load balancing scenario, depending on the parameters in the Gateway profile on the SAP R/3 system. It is recommended to consult an SAP R/3 system administrator for more information. 

However, the profile is either set to 0 (no load balancing), 1 (lowest counter), or 2 (lowest load). The SAP R/3 system administrator can provide the required information on how to configure your destinations to take advantage of each situation. If load balancing is not enabled and you register multiple server channels with the same Program ID without performing Oracle schema validation, then it is possible to receive IDocs in the wrong channel because there is no routing on the channels or destinations.

SAP官方的说明:

Defines the type of load balancing for registered programs. The following values are permitted:

0 : No load balancing; the first free registered program is used.
1 : The program with the lowest counter is used. Every time a registered program is assigned a request, the counter is increased by one.
2 : The program with the lowest load is used. The load is determined as defined by profile parameter gw/reg_lb_ip.
Default value

1

Dynamic

Yes

gw/reg_lb_default

Default value for the load of a server if its IP address cannot be found in the list.

Default value

20

Dynamic

Yes

gw/reg_lb_ip

Specifies the load value for an IP address or for a range of IP addresses. A host name can be entered in the place of an IP address. The gateway then determines the IP address for the host name. 
When the registered program logs onto the gateway, the IP address is used to determine what the load of the IP address is. The system searches the list in the order specified by the profile parameter. This value is added to the load when this program receives a request. If the IP address is not found, the system uses the value defined by parameter gw/reg_lb_default. This ensures that a strong server is assigned more requests than a weaker server. A server that registers itself with the gateway receives as initial value the highest load of all servers with the same registration ID. If no servers are registered with this ID, or if no requests have been assigned to these servers, the value is 0.

资料都指向了一个参数:gw/reg_lb_level,

我看了一下SAP开发机,这个值是1,应该就是我想要的,有负载均衡的功能。

1 : The program with the lowest counter is used. Every time a registered program is assigned a request, the counter is increased by one.
SAP MessageServer (Gateway)会管理这些通向外围系统的道路,这些道路每用一次,会有一个计数器加1,而发送数据走哪一条路,SAP MessageServer会按lowest counter最少次数的,先用这个原则来实现负载均衡。

理解了“SAP发”这种模式的“负载均衡”:

参考资料:SAP 接口 inbound (SAP CALL JAVA ) 负载均衡说明_sap负载均衡-CSDN博客

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值