users@glassfish.java.net

Re: how to setup loadbalancing on glassfish?

From: <glassfish_at_javadesktop.org>
Date: Fri, 25 Apr 2008 06:41:47 PDT

Hello,

I'd love to explain my problem with glassfish plugin for Sun Java System Web Server.
I've noticed a delay in data delivery over long lived HTTP connection when I use SJSWS as a load balancer. There is no such delay if I connect browser directly to Glassfish.

here is my use case:

the browser open http connection with SJSWS. SJSWS forwards the request to glassfish. On glassfish side a servlet writes to HttpServletResponse object then flushes response's PrintWriter. But it takes a while before the browser actually receives that response. I'm not able to say how long exactly it takes but It's around 10 seconds.

Servlet's response look like the following,

Server: Sun-Java-System-Web-Server/7.0
Date: Fri, 25 Apr 2008 12:48:24 GMT
X-powered-by: Servlet/2.5
Cache-control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-type: text/html; charset=iso-8859-1
Date: Fri, 25 Apr 2008 12:48:23 GMT
Transfer-encoding: chunked
149
<html>
        <head>
                <title>Connect</title>
                <script type="text/javascript">
                        function k(){
                                parent.start();
                        }
                </script>
        </head>
        <body>
                <script type="text/javascript">
                        k();
                </script>

Important is that there is no ending html tag. I use pushlet streaming. And the connection is still open.

where such huge delay comes from?

thank you in advance,
alexandre efremov
[Message sent by forum member 'aefremov' (aefremov)]

http://forums.java.net/jive/thread.jspa?messageID=271215