summaryrefslogtreecommitdiff
path: root/caddytest/integration/caddyfile_adapt/reverse_proxy_load_balance_wrr.txt
blob: d41c4b8bf5c636b3b58a86ff953df98860dae6a8 (plain)
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
:8884

reverse_proxy 127.0.0.1:65535 127.0.0.1:35535 {
	lb_policy weighted_round_robin 10 1
	lb_retries 5
	lb_try_duration 10s
	lb_try_interval 500ms
	lb_retry_match {
		path /foo*
		method POST
	}
	lb_retry_match path /bar*
}
----------
{
	"apps": {
		"http": {
			"servers": {
				"srv0": {
					"listen": [
						":8884"
					],
					"routes": [
						{
							"handle": [
								{
									"handler": "reverse_proxy",
									"load_balancing": {
										"retries": 5,
										"retry_match": [
											{
												"method": [
													"POST"
												],
												"path": [
													"/foo*"
												]
											},
											{
												"path": [
													"/bar*"
												]
											}
										],
										"selection_policy": {
											"policy": "weighted_round_robin",
											"weights": [
												10,
												1
											]
										},
										"try_duration": 10000000000,
										"try_interval": 500000000
									},
									"upstreams": [
										{
											"dial": "127.0.0.1:65535"
										},
										{
											"dial": "127.0.0.1:35535"
										}
									]
								}
							]
						}
					]
				}
			}
		}
	}
}