Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Move retry logic for scale from zero into rio #952

Merged
merged 1 commit into from
Dec 23, 2019

Conversation

daxmc99
Copy link
Contributor

@daxmc99 daxmc99 commented Dec 20, 2019

This moves the retry logic for the scale from zero functionality into
the Rio controller where it can be performed by the Envoy proxy (Gloo).

Addresses #607

@daxmc99 daxmc99 requested a review from StrongMonkey December 20, 2019 23:54
@daxmc99 daxmc99 marked this pull request as ready for review December 22, 2019 04:24
@daxmc99 daxmc99 requested a review from cbron December 22, 2019 20:44
@@ -7,7 +7,7 @@ services:
- '* autoscale.rio.cattle.io/servicescalerecommendations'
- '* rio.cattle.io/services'
- '* rio.cattle.io/services/status'
image: rancher/rio-autoscaler:v0.1.5
image: daxl/rio-autoscaler:dev3
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@StrongMonkey StrongMonkey left a comment

Choose a reason for hiding this comment

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

💯

Copy link
Contributor

@cbron cbron left a comment

Choose a reason for hiding this comment

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

lgtm, curious as to how 2 seconds was decided on ?

@@ -2,6 +2,9 @@ package vsfactory

import (
"net"
"time"

"github.com/solo-io/gloo/projects/gloo/pkg/api/v1/options/retries"

Copy link
Contributor

Choose a reason for hiding this comment

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

nit: space

// Retry configuration for the envoy gateway (Gloo) https://www.envoyproxy.io/learn/automatic-retries
// for services scaled to zero
var overallTimeout = time.Second * 30
var perTryTimeout = time.Second * 2
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was what I saw as a decent timeout for each request. Ultimately I think this may need to be configurable based upon the service being scaled

This moves the retry logic for the scale from zero functionality into
the Rio controller where it can be performed by the Envoy proxy (Gloo).
@daxmc99 daxmc99 merged commit 332c9c9 into rancher:master Dec 23, 2019
@daxmc99 daxmc99 deleted the autoscaler branch December 23, 2019 19:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants