-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdefault.vcl
99 lines (83 loc) · 1.36 KB
/
default.vcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
vcl 4.0;
import directors;
probe basic {
.url = "/";
.timeout = 1s;
.interval = 10s;
.window = 5;
.threshold = 3;
}
backend tile1 {
.host = "tile1";
.port = "8080";
.probe = basic;
}
backend tile2 {
.host = "tile2";
.port = "8080";
.probe = basic;
}
backend tile3 {
.host = "tile3";
.port = "8080";
.probe = basic;
}
backend tile4 {
.host = "tile4";
.port = "8080";
.probe = basic;
}
backend tile5 {
.host = "tile5";
.port = "8080";
.probe = basic;
}
backend tile6 {
.host = "tile6";
.port = "8080";
.probe = basic;
}
backend tile7 {
.host = "tile7";
.port = "8080";
.probe = basic;
}
backend tile8 {
.host = "tile8";
.port = "8080";
.probe = basic;
}
backend tile9 {
.host = "tile9";
.port = "8080";
.probe = basic;
}
backend tile10 {
.host = "tile10";
.port = "8080";
.probe = basic;
}
sub vcl_init {
new bar = directors.round_robin();
bar.add_backend(tile1);
bar.add_backend(tile2);
bar.add_backend(tile3);
bar.add_backend(tile4);
bar.add_backend(tile5);
bar.add_backend(tile6);
bar.add_backend(tile7);
bar.add_backend(tile8);
bar.add_backend(tile9);
bar.add_backend(tile10);
}
sub vcl_recv {
# send all traffic to the bar director:
set req.backend_hint = bar.backend();
return (hash);
}
sub vcl_deliver {
return (deliver);
}
sub vcl_backend_response {
set beresp.ttl = 2h;
}