Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
remi_astier
Advisor
Advisor
Hybrid architectures are quite common, companies are not moving to the cloud in with a single giant leap forward for instance.

To expose and on-premise database or application to another running in the SAP BTP cloud, an agent is installed inside the network as shown in this picture:


Hybrid Architecture with on prem and BTP


The picture mentions the Cloud Connector, but other situations require a Data Provisionning Agent, or a SAP Analytics Cloud Agent.

The bandwidth between the two data center can be 10-100 Mbit with 1% average utlization, but during peaks, traffic congestion affects all resources.

If resource A and B provide information to a customer portal hosted in BTP, then we should ensure that customer experience is't slowed down because of heavy traffic caused by a the less important  resource C.

A corporate proxy might have quality of service features, but in this situation all traffic comes from the cloud connector and the proxy cannot distinguish traffic from A, B and C.

One quick fix is to define route priorities or bandwidth limits on the cloud connector. The cloud connector software doesn't allow such configuration but all linux systems do! Operating system privileges are required to configure traffic rules.

The linux module is called "tc", which stands for Traffic Control. For a network interface, a basic configuration is set, then traffic classes are defined with priorities or limits, and lastly classes are linked with IP addresses.

Heres's an example to throttle bandwidth with a given IP address at 2 mbits/s







#Set a class based queue for adapter eth0 which supports approximately 1 Gbit/s (capacity doesn't have to be accurate)
sudo tc qdisc add dev eth0 root handle 1: cbq avpkt 1000 bandwidth 1000mbit

#create a class with a maximum throughput of 2 mbits/s
sudo tc class change dev eth0 parent 1: classid 1:1 cbq rate 2mbit allot 5500 prio 5 bounded isolated

#apply a bandwidth limit for transfer to and from a given ip addresses
sudo tc filter add dev eth0 parent 1: protocol ip prio 16 u32 match ip dst 52.143.17.52 flowid 1:1
sudo tc filter add dev eth0 parent 1: protocol ip prio 16 u32 match ip src 52.143.17.52 flowid 1:1


Setting a bandwidth limit means there is potentially unused capacity, but it is a solution with little configuration, only 4 lines that can be executed without interruption.

Why throttle the bandwidth?

There was a situation were a large table needed to be transferred and the time was longer than required. We were not certain if the bottleneck was the bandwidth, the database connection or some other resource. We applied various limits on the bandwidth and measured the transfer time.

We concluded that the time to transfer a table from an on-premise database over the data provisioning agent onto HANA Cloud decreases linearly when the bandwidth limit is raised (until the bandwidth is saturated):


To conclude, even though bandwidth from a corporate network to a public cloud is almost always sufficient, it is important to keep an eye on it and mitigate the impacts of a network link saturation by applying limits or priority classes.