Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(defaulting): modify the default startup period seconds: 5s -> 1s to speed up the startup #228

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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