Skip to Content
avatar image
Former Member

REST Performance & Keep Alives

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()
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

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

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 28, 2017 at 10:11 PM

    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 ...

    Add comment
    10|10000 characters needed characters exceeded

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

    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)
    Add comment
    10|10000 characters needed characters exceeded