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博客

相关推荐
盛派网络小助手1 小时前
微信 SDK 更新 Sample,NCF 文档和模板更新,更多更新日志,欢迎解锁
开发语言·人工智能·后端·架构·c#
∝请叫*我简单先生2 小时前
java如何使用poi-tl在word模板里渲染多张图片
java·后端·poi-tl
zquwei3 小时前
SpringCloudGateway+Nacos注册与转发Netty+WebSocket
java·网络·分布式·后端·websocket·网络协议·spring
dessler3 小时前
Docker-run命令详细讲解
linux·运维·后端·docker
Q_19284999064 小时前
基于Spring Boot的九州美食城商户一体化系统
java·spring boot·后端
ZSYP-S4 小时前
Day 15:Spring 框架基础
java·开发语言·数据结构·后端·spring
Yuan_o_5 小时前
Linux 基本使用和程序部署
java·linux·运维·服务器·数据库·后端
程序员一诺5 小时前
【Python使用】嘿马python高级进阶全体系教程第10篇:静态Web服务器-返回固定页面数据,1. 开发自己的静态Web服务器【附代码文档】
后端·python
DT辰白6 小时前
如何解决基于 Redis 的网关鉴权导致的 RESTful API 拦截问题?
后端·微服务·架构