Results 1 to 9 of 9

Thread: Http-invoker performance?

  1. #1
    Join Date
    Nov 2004
    Posts
    3

    Default Http-invoker performance?

    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?


    Thanks,


    -- JK

  2. #2
    Join Date
    Aug 2004
    Location
    Southampton, UK
    Posts
    826

    Default

    Jacek,

    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.

    Rob

  3. #3

    Default HttpInvoker performance

    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.

  4. #4
    Join Date
    Nov 2004
    Posts
    3

    Default Performance problems - non-local only

    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,

    -- JK

  5. #5
    Join Date
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    335

    Default

    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?

    Ollie

  6. #6
    Join Date
    Aug 2004
    Location
    Southampton, UK
    Posts
    826

    Default

    JK,

    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).

    Rob

  7. #7

    Default

    I also re-ran my test using an IP address and did not see the degradation.

  8. #8
    Join Date
    Nov 2004
    Posts
    3

    Default Mystery solved

    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.

    -- JK

  9. #9
    Join Date
    Aug 2004
    Location
    Southampton, UK
    Posts
    826

    Default

    Thanks for posting back with the information - I'll update the issue in JIRA.


    Rob

Similar Threads

  1. Spring HTTP Invoker and HTTP Forwarding Proxy
    By dkar77 in forum Remoting
    Replies: 3
    Last Post: Sep 21st, 2005, 08:59 PM
  2. Spring http invoker: retrieving the application context...?
    By gvl@foundation.be in forum Remoting
    Replies: 1
    Last Post: Jun 21st, 2005, 12:59 AM
  3. Replies: 1
    Last Post: Dec 17th, 2004, 04:57 AM
  4. New Remoting Strategy: HTTP Invoker
    By tcollins in forum Remoting
    Replies: 12
    Last Post: Oct 13th, 2004, 04:34 PM
  5. HTTP Invoker server in standalone app
    By murrayd in forum Remoting
    Replies: 0
    Last Post: Oct 1st, 2004, 09:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •