cmd/tipgodoc: implement health checking and enable auto-scaling
Change-Id: I860d0913d051616d7958a88a3c7b11a26ec1d4d6 Reviewed-on: https://go-review.googlesource.com/14661 Reviewed-by: Chris Broadfoot <cbro@golang.org>
This commit is contained in:
parent
374b14e99b
commit
6c387a1d07
|
@ -3,12 +3,10 @@ runtime: custom
|
|||
api_version: go1
|
||||
vm: true
|
||||
|
||||
manual_scaling:
|
||||
instances: 1
|
||||
automatic_scaling:
|
||||
min_num_instances: 1
|
||||
max_num_instances: 2
|
||||
|
||||
handlers:
|
||||
- url: /.*
|
||||
script: _go_app
|
||||
|
||||
health_check:
|
||||
enable_health_check: False
|
||||
|
|
|
@ -71,6 +71,10 @@ func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
http.Error(w, s, http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
if r.URL.Path == "/_ah/health" {
|
||||
fmt.Fprintln(w, "OK")
|
||||
return
|
||||
}
|
||||
proxy.ServeHTTP(w, r)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue