google-nomulus/java/google/registry/proxy
jianglai 84eab90000 Make GCP proxy log in a Stackdriver logging compliant format
When not running locally, the logging formatter is set to convert the log record to a single-line JSON string that Stackdriver logging agent running in GKE will pick up and parse correctly.

Also removed redundant logging handler in the proxy frontend connection. They have two problems: 1) it is possible to leak PII when all frontend traffic is logged, such as client IPs. Even though this is less of a concern because the GCP TCP proxy load balancer masquerade source IPs. 2) We are only logging the HTTP request/response that the frontend connection is sending to/receiving from the backend connection, but the backend already has its own logging handler to log the same message that it gets from/sends to the GAE app, so the logging in the frontend connection does not really give extra information.
Logging of some potential PII information such as the source IP of a proxied connection are also removed.

Thirdly, added a k8s autoscaling object that scales the containers based on CPU load. The default target load is 80%. This, in connection with GKE cluster VM autoscaling, means that when traffic is low, we'll only have one VM running one container of the proxy.

Fixes a bug where the MetricsComponent generates a separate ProxyConfig that does not call parse method on the command line args passed, resulting default Environment always being used in constructing the metric reporter.

Lastly a little bit of cleaning of the MOE config script, no newlines are necessary as the BUILD are formatted after string substitution.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188029019
2018-03-06 19:23:23 -05:00
..
config Use bazel rules to build docker image and push to GCR 2018-03-06 19:08:24 -05:00
handler Make GCP proxy log in a Stackdriver logging compliant format 2018-03-06 19:23:23 -05:00
kubernetes Make GCP proxy log in a Stackdriver logging compliant format 2018-03-06 19:23:23 -05:00
metric Register quota metrics in GCP proxy 2018-02-20 15:39:15 -05:00
quota Add QuotaHandler to GCP proxy 2018-02-20 15:36:23 -05:00
resources Open source GCP proxy 2017-11-21 19:19:03 -05:00
BUILD Make GCP proxy log in a Stackdriver logging compliant format 2018-03-06 19:23:23 -05:00
CertificateModule.java Open source GCP proxy 2017-11-21 19:19:03 -05:00
EppProtocolModule.java Make GCP proxy log in a Stackdriver logging compliant format 2018-03-06 19:23:23 -05:00
GcpJsonFormatter.java Make GCP proxy log in a Stackdriver logging compliant format 2018-03-06 19:23:23 -05:00
HealthCheckProtocolModule.java Open source GCP proxy 2017-11-21 19:19:03 -05:00
HttpsRelayProtocolModule.java Open source GCP proxy 2017-11-21 19:19:03 -05:00
MetricsModule.java Move metrics dependencies to artifacts under Maven groupId com.google.monitoring-client 2018-01-04 17:12:35 -05:00
Protocol.java Open source GCP proxy 2017-11-21 19:19:03 -05:00
ProxyConfig.java Add ability to configure proxy quotas 2017-12-13 12:43:45 -05:00
ProxyModule.java Make GCP proxy log in a Stackdriver logging compliant format 2018-03-06 19:23:23 -05:00
ProxyServer.java Make GCP proxy log in a Stackdriver logging compliant format 2018-03-06 19:23:23 -05:00
WhoisProtocolModule.java Make GCP proxy log in a Stackdriver logging compliant format 2018-03-06 19:23:23 -05:00