HTTP Persistent connections on Apache web-server

Discussion in 'Java' started by webdev50, Sep 26, 2005.

  1. webdev50

    webdev50 Guest


    I need to implement a solution which needs a HTTP persistent connection

    from the client( any browser ) to the webserver ( Apache here )

    This is how I am trying to acheive the persistent connection:

    For every user logging on to the webserver, the browser sends a HTTP
    request to the webserver which is being handled by a servlet on the
    webserver. The servlet then creates a thread which holds the response
    object and waits for some asynchronous data coming from a diff backend
    As soon as some data is posted on to this thread, this thread sends
    back the data to the clent on the response object that it has been
    holding as a java-script object.
    This thread is terminated only when the user logs out od the webserver.

    Now, I have a few questions on this part:

    1) I find that it is not an appropriate solution, given the fact that
    the webserver needs to cater to 20-30k users at a time and creating a
    thread per user on the webserver would really not solve the purpose. Am

    I right ? ( The webserver would die is n't it?..)

    2) Also, is there any limitation on the time that the thread can hold
    the response object? like if the thread doesn't get any data posted on
    to it from a diff backend sever, will the client( here IE or mozilla )
    close the underlying socket connection ?

    3)Any limitation on the scalability of this approach ( I want to know
    to how many users will this approach solve )?

    4) Now given my inner feeling that this approach won't work well, what
    is the best way to implement a lonf-lived HTTP persistenet connection
    from my browser to the webserver.
    (Please note that the webserver need to push some asynchronous data to
    the client as long as the user is logged on the webserver refresh
    mechanism please )

    Apprecaite if reponded well!!!

    Thanks in advance to ALL
    webdev50, Sep 26, 2005
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alex Hunsley

    HTTP/1.1 persistent connections

    Alex Hunsley, Feb 13, 2004, in forum: Java
    Alex Hunsley
    Feb 13, 2004
  2. Replies:
  3. jobs
  4. Scott Sharkey

    Persistent HTTP Connections with Python?

    Scott Sharkey, Jan 10, 2008, in forum: Python
    Rob Kapteyn
    Jan 12, 2008
  5. tanmoy.b81
    Feb 4, 2009

Share This Page