Skip to content

Commit b055bc8

Browse files
author
sarthakpranesh
committed
Updated topos and test results, started service load balancing
Signed-off-by: sarthakpranesh <sarthak.pranesh2018@vitstudent.ac.in>
1 parent 024b9ad commit b055bc8

14 files changed

+423
-400
lines changed

client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
i = 100
55
f = open("../log/log-" + sys.argv[1] + ".txt", "a")
66
while i > 0:
7-
x = requests.get('http://10.0.0.5:8080')
7+
x = requests.get('http://10.0.0.4:9090')
88
f.write(str(x.elapsed.total_seconds())+"\n")
99
i = i - 1
1010

loadBalanceNode.py

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import SimpleHTTPServer
2+
import SocketServer
3+
4+
5+
class MyHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
6+
def do_GET(self):
7+
self.send_response(301)
8+
self.send_header('Location', 'http://10.0.0.5:8080')
9+
self.end_headers()
10+
11+
12+
pywebserver = SocketServer.TCPServer(("", 9090), MyHandler)
13+
14+
pywebserver.serve_forever()

localClient.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
import sys
33

44
i = 100
5-
f = open("../log/log-" + sys.argv[1] + ".txt", "a")
5+
f = open("./log/log-" + sys.argv[1] + ".txt", "a")
66
while i > 0:
7-
x = requests.get('http://192.168.56.101:8080')
7+
x = requests.get('http://192.168.56.101:9090')
88
f.write(str(x.elapsed.total_seconds())+"\n")
99
i = i - 1
1010

log/log-c1.txt

+99-99
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,100 @@
1-
0.006012
2-
0.003627
3-
0.003387
4-
0.007116
5-
0.010471
6-
0.007316
7-
0.006416
8-
0.009693
9-
0.010628
10-
0.00958
11-
0.010358
12-
0.010538
13-
0.010589
14-
0.010846
15-
0.008432
16-
0.008693
17-
0.009842
18-
0.013305
19-
0.009584
20-
0.008807
21-
0.015201
22-
0.011135
23-
0.010631
24-
0.008888
25-
0.008717
26-
0.020515
27-
0.011462
28-
0.010849
29-
0.011404
30-
0.010719
31-
0.010418
32-
0.010656
33-
0.010577
34-
0.010042
35-
0.010191
36-
0.010404
37-
0.009892
38-
0.009633
39-
0.010352
40-
0.009507
41-
0.009664
42-
0.009933
43-
0.009892
44-
0.010227
45-
0.009999
46-
0.012036
47-
0.007907
48-
0.013712
49-
0.013543
50-
0.013253
51-
0.013411
52-
0.012411
53-
0.009721
54-
0.009994
55-
0.009751
56-
0.009763
57-
0.010109
58-
0.009858
59-
0.011815
60-
0.010663
61-
0.010408
62-
0.01299
63-
0.010189
64-
0.009873
65-
0.009034
66-
0.010271
67-
0.009991
68-
0.009599
69-
0.010628
70-
0.013505
71-
0.01076
72-
0.009452
73-
0.011239
74-
0.010454
75-
0.009469
76-
0.010489
77-
0.009334
78-
0.010431
79-
0.009384
80-
0.009493
81-
0.014755
82-
0.010372
83-
0.010963
84-
0.010374
85-
0.011046
86-
0.009647
87-
0.010323
88-
0.01161
89-
0.009853
90-
0.009721
91-
0.009988
92-
0.014123
93-
0.009541
94-
0.009714
95-
0.009715
96-
0.019331
1+
0.002988
2+
0.00324
3+
0.002896
4+
0.006032
5+
0.004601
6+
0.01111
7+
0.010051
8+
0.009162
9+
0.009267
10+
0.008945
9711
0.007989
98-
0.008244
99-
0.007697
100-
0.007413
12+
0.007618
13+
0.009101
14+
0.008789
15+
0.010918
16+
0.00951
17+
0.009543
18+
0.008358
19+
0.009734
20+
0.007909
21+
0.00882
22+
0.008363
23+
0.00898
24+
0.007551
25+
0.009391
26+
0.007535
27+
0.008678
28+
0.007733
29+
0.011395
30+
0.008522
31+
0.007699
32+
0.009464
33+
0.007597
34+
0.011746
35+
0.008654
36+
0.009244
37+
0.008295
38+
0.009212
39+
0.007794
40+
0.00937
41+
0.008054
42+
0.008957
43+
0.008365
44+
0.009198
45+
0.008319
46+
0.009084
47+
0.008269
48+
0.008907
49+
0.008653
50+
0.008913
51+
0.008281
52+
0.009125
53+
0.008103
54+
0.009185
55+
0.008144
56+
0.009121
57+
0.008433
58+
0.009267
59+
0.008457
60+
0.010711
61+
0.00911
62+
0.009933
63+
0.008636
64+
0.009167
65+
0.008507
66+
0.009146
67+
0.011702
68+
0.009281
69+
0.010618
70+
0.008403
71+
0.009319
72+
0.0084
73+
0.009302
74+
0.01069
75+
0.005732
76+
0.007013
77+
0.007005
78+
0.007136
79+
0.007032
80+
0.006986
81+
0.007065
82+
0.007203
83+
0.006963
84+
0.006901
85+
0.006771
86+
0.006844
87+
0.006851
88+
0.006892
89+
0.006994
90+
0.006968
91+
0.009662
92+
0.006893
93+
0.006978
94+
0.006743
95+
0.006737
96+
0.006854
97+
0.006727
98+
0.0067
99+
0.006654
100+
0.00672

0 commit comments

Comments
 (0)