8000 [Processor] Improve termination stability and change readiness FailueThreshold [1.13.x] by rokatyy · Pull Request #3519 · nuclio/nuclio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Processor] Improve termination stability and change readiness FailueThreshold [1.13.x] #3519

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

Merged
merged 1 commit into from
Mar 3, 2025
Merged
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
3 changes: 2 additions & 1 deletion docs/tasks/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ User guide
deploying-pre-built-functions
deploy-functions-from-dockerfile
exporting-and-importing
benchmarking
benchmarking
known-issues
10 changes: 10 additions & 0 deletions docs/tasks/known-issues.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Known issues

### 503 Error Code While Scaling Down (Kubernetes Only)

This is a rare issue that primarily occurs in low-latency setups.
When scaling down a Nuclio function pod, Kubernetes may return a 503 error due to the delay between sending a `SIGTERM` signal and stopping traffic to the pod.

To mitigate this, we've introduced a 5-second wait time before halting event processing after receiving `SIGTERM`. However, this does not fully eliminate the issue.

**Possible Solution**: Implement a client-side retry mechanism when a 503 response is received with an empty body.
2 changes: 1 addition & 1 deletion pkg/platform/kube/functionres/lazy.go
Original file line number Diff line number Diff line change
Expand Up @@ -2376,7 +2376,7 @@ func (lc *lazyClient) populateDeploymentContainer(ctx context.Context,
InitialDelaySeconds: 5,
TimeoutSeconds: 1,
PeriodSeconds: 1,
FailureThreshold: 10,
FailureThreshold: 3,
}

container.LivenessProbe = &v1.Probe{
Expand Down
2 changes: 1 addition & 1 deletion pkg/processor/trigger/trigger.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ func (at *AbstractTrigger) SignalWorkersToTerminate() error {
// DO NOT REMOVE
// this sleep is needed to give k8s some time to stop sending traffic to the service
// before we shut worker down
time.Sleep(1 * time.Second)
time.Sleep(5 * time.Second)

if err := at.WorkerAllocator.SignalTermination(); err != nil {
return errors.Wrap(err, "Failed to signal all workers to terminate")
Expand Down
Loading
0