On 9/19/18, 8:05 AM, Gerald Magnuson wrote:
I am trying to optimize this

I have a http api that I need to hit repetitively :

As it happens, I'm in the same boat.

I've got a suite of RESTful web services, running as part of a Tomcat webapp, on a Google Compute Debian instance (the same one I mentioned before) that I'm hitting tens of thousands of times, mostly with http_url_post_raw calls.

The /tmp/httpapi_debug.txt log file tells me that the HTTPS negotiations are happeing for every single web service call, and I suspect that this is a significant drag on throughput.

I've already had to use http_persist_open, http_persist_req, and http_persist_close, but *only* to handle a service that required a PUT request, and my calls looked like (proprietary information redacted, and blanks squeezed to fit):
C eval wwComm = http_persist_open(%TRIM(XYZSERVER) +
C '/rest/foo/update?id='
C IF wwComm = *NULL
C'open failed' DSPLY
C eval rc=http_persist_req('PUT':
c wwComm : %TRIM(XYZSERVER) +
C '/rest/foo/update?id='
c : 0 : *NULL : updrecp : 48 : 0 :
c %paddr('FILL_BUFFY') :
C 'application/json')
c callp http_persist_close( wwComm )

As you can see, the URL I'm feeding the http_persist_open is very specific to the request that follows. If I'm to use a persistent connection AS a persistent connection, the URL establishing that connection would have to be somewhat more general.

Can that be done, and if so, how? Can somebody either point me to an example, or show me how I would modify the above code?


This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].