Re: request feature enhancement
Status: Alpha
Brought to you by:
coroberti
From: Fred H. <di...@gm...> - 2012-02-27 14:22:33
|
average number of requests using same TCP connection = 1 / (probability of fresh-connect each time when making a request) set 0<x<1, y = 1+x+x^2+x^3+..., ==> y = 1 + x (1 +x+x^2+x^3+...) = 1 + xy ==> y = 1 /(1-x) ==> (1+x+x^2+x^3+... )= x/(1-x) avg# should be L = SUM (n*Pn), n=1, 2, 3.... (n is number of requests in a certain TCP connection, Pn is the presence probability of n) set p as probability of fresh connect each time when making a new request, so L = 1p + 2p(1-p) + 3p(1-p)^2 + 4p(1-p)^3 + ... L/p = 1 + 2(1-p) + 3(1-p)^2 + 4(1-p)^3 + ... = 1 + (1-p) + (1-p)^2 + (1-p)^3 + ... + (1-p) + (1-p)^2 + (1-p)^3 + ... + (1-p)^2 + (1-p)^3 + ... = 1(1 + (1-p) + (1-p)^2 + (1-p)^3 + ... ) + (1-p)(1 + (1-p) + (1-p)^2 + (1-p)^3 + ... ) +((1-p)^2)(1 + (1-p) + (1-p)^2 + (1-p)^3 + ...) + ... = (1 + (1-p) + (1-p)^2 + (1-p)^3 + ... )(1 + (1-p) + (1-p)^2 + (1-p)^3 + ... ) = (1/(1-(1-p))) * (1/(1-(1-p))) = 1/(p^2) so L = 1/p So, could we set url->fresh_connect as re-connect probability instead of always no or yes to better simulate the real world that has some length of TCP reuse? thanks, Fred 2012/2/15 Fred Huang <di...@gm...> > hello all, > > I am requesting below feature enhancements: > > 1. I found curl-loader's -r option never work but FRESH_CONNECT=1 always > re-open new TCP connections. however, the real world browsing almost reuses > TCP connection. the average of TCP reuse I have seen from a F5 loader > banlancer of a large enterprise is 3.4 requests over 1 TCP connection. so > could you add a configuration line such as "TCP_REUSE_RATIO" to enable > opening new TCP connections with a probability, just like FETCH_PROBABILITY? > this can greatly get close to real world. > > 2. url_cycling - its config parse function is commented in code. so the > behavior on a URL_SET constructed from a URL_TOKEN_FILE is a client IP > always send one URL. could this become configurable in config so that each > client IP can fetch url one by one from same URL_SET? > URL_TEMPLATE=%s > URL_TOKEN_FILE=sfile.urls > > thanks, > Fred > |