-
Notifications
You must be signed in to change notification settings - Fork 808
Expand file tree
/
Copy pathconstant.go
More file actions
121 lines (113 loc) · 3.68 KB
/
Copy pathconstant.go
File metadata and controls
121 lines (113 loc) · 3.68 KB
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
package e2eincrementalupgrade
import "k8s.io/utils/ptr"
type serveConfigV2 string
// These parameters control capacity scaling and gradual traffic migration during the upgrade.
type incrementalUpgradeParams struct {
Name string
StepSize int32
Interval int32
MaxSurge int32
}
// incrementalUpgradeCombinations defines diverse (stepSize, interval, maxSurge) combinations
// to exercise different upgrade behaviors. Each combination targets a distinct scenario.
var incrementalUpgradeCombinations = []incrementalUpgradeParams{
{
// Scenario: Instant cutover.
// All capacity and traffic shift in one step, which behaves like a blue/green deployment.
StepSize: 100,
Interval: 1,
MaxSurge: 100,
Name: "BlueGreen",
},
{
// Scenario: Standard gradual upgrade.
// Scaling and migration in multiple steps.
StepSize: 25,
Interval: 5,
MaxSurge: 50,
Name: "StandardGradual",
},
{
// Scenario: Conservative gradual upgrade.
// Low-step, long-interval scaling and migration in multiple steps.
StepSize: 5,
Interval: 10,
MaxSurge: 25,
Name: "ConservativeGradual",
},
}
// ptrs returns (*stepSize, *interval, *maxSurge) for use with the RayService bootstrap helper.
func (p incrementalUpgradeParams) ptrs() (*int32, *int32, *int32) {
return ptr.To(p.StepSize), ptr.To(p.Interval), ptr.To(p.MaxSurge)
}
// The following defines the Serve configurations for different types of incremental upgrade tests, including:
// - Functional test
// - High-RPS Locust load test
//
// NOTE: working_dir is coupled with the external GitHub repos, which might lead to CI flakiness considering the
// availability and stability of these repos and specific commit hashes.
// defaultIncrementalUpgradeServeConfigV2 configures a Serve app for functional tests.
const defaultIncrementalUpgradeServeConfigV2 serveConfigV2 = `applications:
- name: fruit_app
import_path: fruit.deployment_graph
route_prefix: /fruit
runtime_env:
working_dir: "https://github.com/ray-project/test_dag/archive/78b4a5da38796123d9f9ffff59bab2792a043e95.zip"
deployments:
- name: MangoStand
num_replicas: 1
user_config:
price: 3
ray_actor_options:
num_cpus: 0.1
- name: OrangeStand
num_replicas: 1
user_config:
price: 2
ray_actor_options:
num_cpus: 0.1
- name: FruitMarket
num_replicas: 1
ray_actor_options:
num_cpus: 0.1
- name: math_app
import_path: conditional_dag.serve_dag
route_prefix: /calc
runtime_env:
working_dir: "https://github.com/ray-project/test_dag/archive/78b4a5da38796123d9f9ffff59bab2792a043e95.zip"
deployments:
- name: Adder
num_replicas: 1
user_config:
increment: 3
ray_actor_options:
num_cpus: 0.1
- name: Multiplier
num_replicas: 1
user_config:
factor: 5
ray_actor_options:
num_cpus: 0.1
- name: Router
num_replicas: 1
ray_actor_options:
num_cpus: 0.1
`
// highRPSServeConfigV2 configures a minimal high-RPS Serve app (SimpleDeployment) for Locust load tests.
const highRPSServeConfigV2 serveConfigV2 = `applications:
- name: simple_app
import_path: simple_serve.app
route_prefix: /test
runtime_env:
working_dir: "https://github.com/jiangjiawei1103/incr-upgrade-locust/archive/a185bb29374388e801db4331ae73af3ad1e79a5f.zip"
deployments:
- name: SimpleDeployment
autoscaling_config:
min_replicas: 1
max_replicas: 3
target_ongoing_requests: 2
max_ongoing_requests: 6
upscale_delay_s: 0.5
ray_actor_options:
num_cpus: 2
`