Skip to content

Commit

Permalink
refactor(defaulting): modify the default startup period seconds: 5s -…
Browse files Browse the repository at this point in the history
…> 1s to speed up the startup
  • Loading branch information
zyy17 committed Dec 3, 2024
1 parent 3b0b025 commit 18cf111
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 24 deletions.
10 changes: 6 additions & 4 deletions apis/v1alpha1/defaulting.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,11 +398,13 @@ func defaultStartupProbe() *corev1.Probe {
Port: intstr.FromInt32(DefaultHTTPPort),
},
},
PeriodSeconds: 5,

// The StartupProbe can try up to 60 * 5 = 300 seconds to start the container.
// For some scenarios, the datanode may take a long time to start, so we set the failure threshold to 60.
FailureThreshold: 60,
// Check for the health endpoint every second to speed up the startup.
PeriodSeconds: 1,

// The StartupProbe can try up to 300 * 1 = 300 seconds(5 minutes) to start the container.
// For some scenarios, the datanode may take a long time to start, so we set the failure threshold to 300.
FailureThreshold: 300,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ spec:
httpGet:
path: /health
port: 4000
periodSeconds: 5
failureThreshold: 60
periodSeconds: 1
failureThreshold: 300
frontend:
replicas: 1
httpPort: 9000
Expand Down Expand Up @@ -81,8 +81,8 @@ spec:
httpGet:
path: /health
port: 9000
periodSeconds: 5
failureThreshold: 60
periodSeconds: 1
failureThreshold: 300
resources:
limits:
cpu: 100m
Expand Down Expand Up @@ -125,8 +125,8 @@ spec:
httpGet:
path: /health
port: 4000
periodSeconds: 5
failureThreshold: 60
periodSeconds: 1
failureThreshold: 300
resources:
limits:
cpu: 50m
Expand Down Expand Up @@ -173,8 +173,8 @@ spec:
httpGet:
path: /health
port: 4000
periodSeconds: 5
failureThreshold: 60
periodSeconds: 1
failureThreshold: 300
resources:
limits:
cpu: 100m
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ spec:
httpGet:
path: /health
port: 4000
periodSeconds: 5
failureThreshold: 60
periodSeconds: 1
failureThreshold: 300
frontend:
replicas: 1
httpPort: 4000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ spec:
httpGet:
path: /health
port: 4000
periodSeconds: 5
failureThreshold: 60
periodSeconds: 1
failureThreshold: 300
resources:
requests:
cpu: "500m"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ spec:
httpGet:
path: /health
port: 4000
periodSeconds: 5
failureThreshold: 60
periodSeconds: 1
failureThreshold: 300
frontend:
replicas: 1
httpPort: 4000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ spec:
httpGet:
path: /health
port: 4000
periodSeconds: 5
failureThreshold: 60
periodSeconds: 1
failureThreshold: 300
version: latest
initializer:
image: greptime/greptimedb-initializer:latest
Expand Down Expand Up @@ -114,8 +114,8 @@ spec:
httpGet:
path: /health
port: 4000
periodSeconds: 5
failureThreshold: 60
periodSeconds: 1
failureThreshold: 300
datanodeStorage:
dataHome: /data/greptimedb
fs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ spec:
httpGet:
path: /health
port: 4000
periodSeconds: 5
failureThreshold: 60
periodSeconds: 1
failureThreshold: 300
service:
type: ClusterIP
logging:
Expand Down

0 comments on commit 18cf111

Please sign in to comment.