Developer Community

Reply
Occasional Contributor II

ArubaOS REST API - Random Delays

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.

MVP Expert

Re: ArubaOS REST API - Random Delays

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)

 




PowerArubaSW: Powershell Module to use Aruba Switch API for Vlan, VlanPorts, LACP, LLDP... More info


PowerArubaCP: Powershell Module to use ClearPass API (create NAD, Guest...) More info


PowerArubaCX: Powershell Module to use ArubaCX API (get interface/vlan/ports info)


PowerArubaIAP: Powershell Module to use Aruba Instant AP




ACMP 6.4 / ACMX #107 / ACCP 6.5
Occasional Contributor II

Re: ArubaOS REST API - Random Delays

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?

Occasional Contributor II

Re: ArubaOS REST API - Random Delays

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?

MVP Expert

Re: ArubaOS REST API - Random Delays

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 )




PowerArubaSW: Powershell Module to use Aruba Switch API for Vlan, VlanPorts, LACP, LLDP... More info


PowerArubaCP: Powershell Module to use ClearPass API (create NAD, Guest...) More info


PowerArubaCX: Powershell Module to use ArubaCX API (get interface/vlan/ports info)


PowerArubaIAP: Powershell Module to use Aruba Instant AP




ACMP 6.4 / ACMX #107 / ACCP 6.5
Occasional Contributor II

Re: ArubaOS REST API - Random Delays

Great info thanks @

Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: