Our problem began 02/Sep/2015 17:46 (Paris time), and there is still issus at present. We have 2 applications: one for test and development and the other one for the production. The problem is in the production application.
There had been 5 days that we didn't modify the code in production application, but suddenly the latence became very very long the last friday afternoon. The latence was 100~300ms before, but became 30s from from that moment on, and for all requests!
We use the same code for the test application, but all work well for this application.
We have several modules in the production application, and there is only one module has this problem, all others mudules work well.
During the weekend, we make some tests, but still can not find why. For exemple, the code here:
package app
import (
"net/http"
)
func init() {
http.HandleFunc("/", HandlerHeartBeat)
}
func HandlerHeartBeat(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(202)
}
When I deploy this code to the problematic module in the production application, the latence is 2s. Then I try to deploy it to another version in the problematic module, the latence is always very long. But if deploy this code to other module in the production application (or just create a new module), I get the normal latence(~50ms).
Our configuration file is very simple:
application: APP_NAME
module: MODULE_NAME
version: 1
runtime: go
api_version: go1
handlers:
- url: /.*
script: _go_app
I don't know if there is other people meet the same problem like me. Thank you
It's very likely there is an issue with Google infrastructure that serve the problematic module.
Probably it calculate some hash code for a module and try to instantiate an instance of the same module on the same machine if possible so app code is cached on the (virtual) machine level if possible. If that machine has issues (for example with hardware) it translates to increased latency for your app.
I would advise: