View Full Version : Http-invoker performance?
Nov 24th, 2004, 07:42 PM
I ran the http-invoker based jpetstore sample. Interestingly, I got reasonably fast response times for up to 3 repetitions of the service request (400 ms or so). Beyond 4 repetitions, though, the performance got worse and worse, and it sort of stabilized at about 2 seconds/request, for, say, a loop of 20 requests.
What is causing this significant performance degradation? The requests are sent sequentially in a loop, so there is always only request dealt with at a time.
Has anyone alse noticed it? Is there a remedy?
Nov 29th, 2004, 10:16 AM
I have created a bug report for this on JIRA and I will look into in more detail to see if I can reproduce this problem and if so if I can fix it.
Nov 30th, 2004, 11:49 AM
I have been looking into using HttpInvoker to call services from an applet. I ran my small test looping through 20 calls and did not notice this behavior.
Dec 1st, 2004, 10:29 PM
One note: The problematic performance can only be observed when NOT using "localhost" for the server address in client.properties, but a regular IP address (even though the client and the server are on the same machine). For "localhost", the performance is relatively consistent whether I have 1 or 20 iterations.
What I am puzzled with is not the ABSOLUTE performance (with network overhead, performance degradation is to be expected), but rather the sudden drop from 1-3 repetitions (very good performance) to 20 repetitions (very poor performance, 10-15x times worse).
msauer, could you re-run your test not using localhost, but an IP address?
Could it be the network?
Thanks in advance,
Dec 1st, 2004, 10:50 PM
Sounds like a problem with keep alive connections to me.
What could be happening is that for some reason a new connection to the server is being created for each invocation rather than a keep alive being reused... but the old keep alive connections still exist and are still connected resulting in your server being overloaded with open connections that do nothing. Or it could be that the http client has some kind of limit on the number of concurrent connections it will make to a single server and it's waiting for an old connection to close before it will initiate a new connection....
Have you tried doing your test using both the JDK (SimpleHttpInvokerRequestExecutor) and HttpClient (CommonsHttpInvokerRequestExecutor) executors?
Dec 3rd, 2004, 05:24 AM
I set up simple test to check the performance of the HttpInvoker but I didn't get the same degradation as you did. I tried with both localhost and my local IP and results were similar.
Can you post a case that is definitely not working for you along with configuration (servlet container etc).
Dec 6th, 2004, 08:58 AM
I also re-ran my test using an IP address and did not see the degradation.
Dec 10th, 2004, 10:45 PM
Looks like it has something to do with my Network Address Translation setup.
I ran the test on the private network (192.168.*) and did NOT see the degradation. The problem happens only when I try to use the external IP address. So I assume it is some kind of a NAT problem.
Thanks to all who helped with this.
Dec 11th, 2004, 06:47 AM
Thanks for posting back with the information - I'll update the issue in JIRA.
Powered by vBulletin® Version 4.2.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.