Expected Behavior
Once a revision is marked ready, we should be able to send requests to the revision.
Actual Behavior
7 seconds after a revision is marked ready, the forwarded request got timeout error.
http: proxy error: dial tcp 10.31.249.52:80: i/o timeout
This doesn't happen 100%.
Currently, we mark a revision ready when there is at least one endpoint available.
https://github.com/elafros/elafros/blob/0be70191e5021bfeb8e29593490e5d0a2c24d8cc/pkg/controller/revision/revision.go#L492
Steps to Reproduce the Problem
This is best to repro with the activator development work. When a revision is inactive, send a request, the activator should activate the revision and hold the request until it's ready.
Additional Info
We may consider the readinessProbe definition if customer defined it like here.
https://github.com/elafros/elafros/blob/9ec25c157ee67116d2cb9e5a20519f93eda3e250/sample/helloworld/configuration.yaml#L31-L36
https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#define-readiness-probes
"The kubelet uses readiness probes to know when a Container is ready to start accepting traffic."
Expected Behavior
Once a revision is marked ready, we should be able to send requests to the revision.
Actual Behavior
7 seconds after a revision is marked ready, the forwarded request got timeout error.
http: proxy error: dial tcp 10.31.249.52:80: i/o timeout
This doesn't happen 100%.
Currently, we mark a revision ready when there is at least one endpoint available.
https://github.com/elafros/elafros/blob/0be70191e5021bfeb8e29593490e5d0a2c24d8cc/pkg/controller/revision/revision.go#L492
Steps to Reproduce the Problem
This is best to repro with the activator development work. When a revision is inactive, send a request, the activator should activate the revision and hold the request until it's ready.
Additional Info
We may consider the readinessProbe definition if customer defined it like here.
https://github.com/elafros/elafros/blob/9ec25c157ee67116d2cb9e5a20519f93eda3e250/sample/helloworld/configuration.yaml#L31-L36
https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#define-readiness-probes
"The kubelet uses readiness probes to know when a Container is ready to start accepting traffic."