Experience sharing of 7-layer soft load under Windows (2)

  
        Test unit

scene design:

such as a request to obtain the user's head, the user's avatar stored in the DB in multiple by a plurality of web servers (webserver1, webserver2) picture buffer according The user's HTTP request is returned to the client user avatar. Since the web server caches the user avatar, it is a stateful service. Therefore, the HTTP request has a userid parameter. The 7-layer load is hashed according to the userid and the request is routed to the cache. User avatar web server.

request format:?

GET /getportrait.ASPx userid = {userid}

wherein {userid} be Int32, the routing algorithm is {userid} mod2 = 0, then routed to webserver1, {userid} mod2 = 1 then routes the response to the format webserver2

:

200OKHTTP1.0

Content-Length: 5

Content -Type: text /txt

{userportrait}

wherein {userportrait} to facilitate testing of text, name of the machine itself is webserver

test:

request GET /getportrait.ASPx? userid = 1111, is expected to return a response webserver2

request GET /getportrait.ASPx? userid = 2222, is expected to return a response webserver1

specific random test userid An integer is generated and the response is expected based on whether it can be divisible by 2.



Performance Testing Test preparation:

RealServer1 two physical machines and RealServer2, a soft load appliances SoFTProxy, two test machine TestClient1, TestClIEnt2.

which SoFTProxy configuration: Xeno3.0G (16-core), 16G memory, Windows2003x64, thousands of M network card (NIC is not considered double balanced).

RealServer configuration: Xeno1.86G (4 nuclei), 8G memory, Windows2003x86


Copyright © Windows knowledge All Rights Reserved