Developer

last person joined: 4 days ago 

Expand all | Collapse all

ArubaOS REST API - Random Delays

This thread has been viewed 3 times
  • 1.  ArubaOS REST API - Random Delays

    Posted Sep 12, 2019 03:57 PM

    Hi,

     

    I'm trying to present my users with port information and need to call three methods to get what I want - port, port-statistics and mac-table.  No problem calling them, or returning data etc.

     

    The issue is a random 5-second delay.  Most of the time the switch will respond in 200-300ms to each query, but, seeming randomly, it will take 5 seconds (normally in the vacinity of 4990-5000ms - which is what makes me suspect an artificial delay).  This means my 3 querys sometimes like ~ 1 second, and other times up to 15 seconds - very frustrating!

     

    Any ideas?

     

    Thanks,

    Ben.



  • 2.  RE: ArubaOS REST API - Random Delays

    MVP GURU
    Posted Sep 12, 2019 05:20 PM

    Hi Ben,

     

    What language do you are using ?

     

    Because i known this issue (bug ? limitation ?) and a way for avoid...

    You need to don't reuse HTTP session (between each API Call)

    On the same HTTP session, you need to wait 5sec between each API call... (and no settings for modified this)

     



  • 3.  RE: ArubaOS REST API - Random Delays

    Posted Sep 12, 2019 05:45 PM

    Hi, thanks for the quick reply.

     

    I'm using .NET (RestSharp client library).

     

    When you say I can't re-use sessions - are you saying that for 3 calls I should create 3 session tokens and then use them sequentially each time I want to refresh the data?



  • 4.  RE: ArubaOS REST API - Random Delays

    Posted Sep 12, 2019 07:09 PM

    I've tried different session cookies for each sequential query to no avail.  I'm still getting 5 second delays.  Normally on the third and subsequent query, but sometimes on the second too.

     

    I've also tried re-establishing the whole RestClient object for each query, same result.

     

    Any other ideas?



  • 5.  RE: ArubaOS REST API - Random Delays
    Best Answer

    MVP GURU
    Posted Sep 13, 2019 02:28 AM

    No, i can be the same session id but it is on TCP session need to create a new session

     

    With PowerShell i using -DisableKeepAlive for RestMethod/WebRequest (See https://github.com/PowerAruba/PowerArubaSW/pull/32 )



  • 6.  RE: ArubaOS REST API - Random Delays

    Posted Sep 13, 2019 07:40 AM

    Great info thanks @