Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Struts - A MVC web framework
Tomcat - JSP/Servlet container
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
JSP - A mailing list about Java Server Pages specification and reference
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
Measuring latency between tomcat instances [Off list-topic answer]

Measuring latency between tomcat instances [Off list-topic answer]

2004-01-22       - By Antonio Fiol Bonn�n

 Back
Jeremy Nix wrote:

>Okay, let me pose another (slightly differenc) question.  Say that
>instance (A) and (B) are separate institutions, independent from each
>other.  Same scenario as before.  How could instance (B) (the responding
>instance) be able to measure latency in instance (A)?  The reason I ask
>is related to an issue that has been reported to me, but I am unable to
>understand how the latency was measured.
>  
>

Is it HTTP or HTTPS? If HTTPS, things get more kludgy, but if it is
HTTP, there is a fairly simple way:

1. start a network analyzer (such as Ethereal) on Tomcat B network.
2. Capture packets until you see a client request that needs a
redirection (I'm pretty sure you have one in your app)
3. You will see some time later a client request for the redirected
resource.
4. Measure the time since the last bit of the redirection until the
first bit of the redirected request.
5. Divide by 2.

With HTTPS, you won't see anything useful on the network analyzer,
unless you know very well the usage pattern. Ig the usage pattern is
known and constant, you can do the same, by "imagining" what you see.

Or, you may even go down a bit more, and this works for both HTTP and
HTTPS, and it may be even simpler (no need to have a redirection):

1. Start a network analyzer on TC B network
2. Capture packets until you see (it should not be a long time ;-) TCP
packets like these:
Packet 1: A -> B Flags: SYN
Packet 2: B -> A Flags: SYN ACK
Packet 3: A -> B Flags: ACK
3. Measure difference between packet 2 and packet 3.
4. Divide by 2.

Of course both procedures assume that network latency is symmetrical.

Hope that helps.


Antonio Fiol

©2008 junlu.com - Jax Systems, LLC, U.S.A.