REST vs SOAP API

Has anyone else noticed that when using the REST API “/api/query” to run session relevance that it can be very slow?

We have found that using SOAP is much quicker than using /api/query space when we need to return results with a session relevance query.

Was curious is anyone had noticed or had a similar experience.

Can you post the queries you are running and some estimates on what slow is? 5 secs vs 10 secs? 1 second vs one minute?

Hi Noah

This is the query we are running:

(status of it as string , ID of computer of it , concatenation " || " of names of computer of it , operating systems of computer of it , (if (exists value of results (bes property “User Name” , it)) then concatenation " | " of (values of results (bes property “User Name” , it)) else “N/A”) of computer of it , (if (exists value of results (bes property “IP Address” , it)) then concatenation " | " of (values of results (bes property “IP Address” , it)) else “N/A”) of computer of it , (if (exists value of results (bes property “Building By IP Range” , it)) then concatenation " | " of (values of results (bes property “Building By IP Range” , it)) else “N/A”) of computer of it , (if (exists value of results (bes property “Region By Half Subnet” , it)) then concatenation " | " of (values of results (bes property “Region By Half Subnet” , it)) else “N/A”) of computer of it) of results of bes actions whose (id of it = #####)

We noticed it takes about 5 seconds to return 16,000 results with the SOAP API. When we run it through the REST API is takes about 29 seconds to run with the same number of results.

Another quirk we noticed was that whether it returned 10 results or 15,000 results to took about the same time to run with the REST API. It could just be my relevance, but it seemed off to see such a difference in response times.

Thanks!

Thanks for reporting this, @vpetrella. We are tracking it internally as bug #65742 and will update this post when we learn more.

Thanks Mike, I’ll keep on eye out for updates.

Was this ever fixed?

We just recently upgraded to v9.2.7.53, and I’m seeing very similar results to the original poster. SOAP consistently returns results within seconds. I’ve tried to break it down to its simplest to try and find the root issue. Simply setting relevance=true shows that the API returns back the correct XML with minimal evaluation time (<1ms) and True.

Where I noticed the large performance difference is when using Master Operator (MO) vs. Non-Master Operator accounts for authenticating to REST. The MO account completed the REST query within a few seconds while the non-MO account consistently took over 20 seconds to complete.

If the original poster is still around, do you recall if your original REST query was being authenticated to with a non-MO account?

You may be countering this APAR

1 Like

Looks like that may be it. Now to play the waiting game until that patch is released… Thanks!