diff --git a/pkg/abstractions/endpoint/buffer.go b/pkg/abstractions/endpoint/buffer.go index 4a443b8b5..b450c8f51 100644 --- a/pkg/abstractions/endpoint/buffer.go +++ b/pkg/abstractions/endpoint/buffer.go @@ -518,7 +518,7 @@ func (rb *RequestBuffer) heartBeat(req *request, containerId string) { ticker := time.NewTicker(endpointRequestHeartbeatInterval) defer ticker.Stop() - rb.rdb.Set(rb.ctx, Keys.endpointRequestHeartbeat(rb.workspace.Name, rb.stubId, req.task.msg.TaskId, containerId), 1, endpointRequestHeartbeatInterval) + rb.rdb.Set(rb.ctx, Keys.endpointRequestHeartbeat(rb.workspace.Name, rb.stubId, req.task.msg.TaskId, containerId), 1, endpointRequestHeartbeatKeepAlive) for { select { case <-ctx.Done(): @@ -526,7 +526,7 @@ func (rb *RequestBuffer) heartBeat(req *request, containerId string) { case <-rb.ctx.Done(): return case <-ticker.C: - rb.rdb.Set(rb.ctx, Keys.endpointRequestHeartbeat(rb.workspace.Name, rb.stubId, req.task.msg.TaskId, containerId), 1, endpointRequestHeartbeatInterval) + rb.rdb.Set(rb.ctx, Keys.endpointRequestHeartbeat(rb.workspace.Name, rb.stubId, req.task.msg.TaskId, containerId), 1, endpointRequestHeartbeatKeepAlive) } } } diff --git a/pkg/abstractions/endpoint/endpoint.go b/pkg/abstractions/endpoint/endpoint.go index f6a772498..818b0c12e 100644 --- a/pkg/abstractions/endpoint/endpoint.go +++ b/pkg/abstractions/endpoint/endpoint.go @@ -53,7 +53,8 @@ var ( endpointRoutePrefix string = "/endpoint" endpointServeContainerTimeout time.Duration = 10 * time.Minute endpointServeContainerKeepaliveInterval time.Duration = 30 * time.Second - endpointRequestHeartbeatInterval time.Duration = 30 * time.Second + endpointRequestHeartbeatInterval time.Duration = 5 * time.Second + endpointRequestHeartbeatKeepAlive time.Duration = 30 * time.Second endpointMinRequestBufferSize int = 10 )