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

Feat: Add warm up endpoint to both endpoints and taskqueues #812

Closed

Conversation

jsun-m
Copy link
Contributor

@jsun-m jsun-m commented Dec 26, 2024

Added a new variable NoOp to the TaskMessage data model which only exists in Redis. If this variable is detected to be true in a task, the idea is that the task handler will detect it and run it as a fake task just so it can complete and start up the timer for the keep warm.

@jsun-m jsun-m requested a review from luke-lombardi December 26, 2024 19:43
@@ -434,6 +434,9 @@ func (rb *RequestBuffer) handleHttpRequest(req *request, c container) {
}

containerUrl := fmt.Sprintf("http://%s/%s", c.address, req.ctx.Param("subPath"))
if req.task.msg.NoOp {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like there a simpler way to do this that doesn't "trick" the system into warming up the task queue. Why not just have the warm up endpoint launch a container and set a keep warm on it so the autoscaler can't shut it down?

@jsun-m jsun-m closed this Dec 26, 2024
@jsun-m jsun-m deleted the john/be-2165-spike-start-up-endpoint-for-deployments branch December 26, 2024 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants