Skip to Content
1

REST Performance & Keep Alives

Aug 28, 2017 at 08:19 AM

121

avatar image
Former Member

We consume REST web services from SAP ABAP (cl_http_client) but are seeing performance issues when very many requests need to be performed.

We imagine part of the overhead is the need to build a new connection to the remote host for each request. Is there any way to reuse connections using the "Keep Alive" features of HTTP 1.1 from ABAP?

Methods used:

  • cl_http_client=>create_by_destination()
  • cl_http_client=>create_by_url()
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
avatar image
Former Member Sep 04, 2017 at 06:12 AM
2

OK, we solved the issue by simply using the same cl_http_client instance for multiple requests.

So basically:

1. Create cl_http_client object lo_client

2. Loop through multiple requests with lo_client->send( ).

3. Close connection with lo_client->close( ).

It's not yet clear if the headers need to be reset between each request.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Marc

Glad you found some way to solve your problem (in part).

Please follow-up for all of us, if additional steps are necessary ...


Thanks

Nic T.

0
Nic Teunckens Aug 28, 2017 at 10:11 PM
0

Can you check / verify with SAP-BASIS if they can / will use info in SAP-KBA's 824554 or 1757252 to check up on and / or modify connection Settings with regard to 'KeepAlive' and 'Timeouts'?

You might do(cument) some testing as to provide good arguments to make changes to this type of settings ...

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thanks for the tip. Unfortunately it seems that the SICM settings for clients only apply to timeouts. The keep-alive settings (at least according to 824554) only apply to servers (i.e. SAP SICF services).

0

See SAP Help on "icm/keep_alive_timeout" : link

See SAP Help mentioning ICM as HTTP-Client : link

SAP Wiki Timout options for ICM : link

0
avatar image
Former Member Oct 16, 2017 at 10:55 AM
0

The parameter "icm/keep_alive_timeout" applies to ICM as a server. My question is related to outgoing requests where ICM is the client.

The parameters relevant seem to be:

  • icm/HTTP/client/keep_alive_timeout (default 10s docs)
  • icm/max_kept_client_conns (no documentation found)
Share
10 |10000 characters needed characters left characters exceeded