Skip to content

Commit 6bbd7a2

Browse files
authored
Update proxy resources, increase ssl handshake timeout (#2819)
1 parent 77ab80f commit 6bbd7a2

File tree

9 files changed

+41
-25
lines changed

9 files changed

+41
-25
lines changed

jetty/kubernetes/nomulus-frontend.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ spec:
9999
apiVersion: apps/v1
100100
kind: Deployment
101101
name: frontend
102-
minReplicas: 8
102+
minReplicas: 12
103103
maxReplicas: 16
104104
metrics:
105105
- type: Resource

networking/src/main/java/google/registry/networking/handler/SslClientInitializer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ protected void initChannel(C channel) throws Exception {
119119
sslContextBuilder
120120
.build()
121121
.newHandler(channel.alloc(), hostProvider.apply(channel), portProvider.apply(channel));
122+
sslHandler.setHandshakeTimeoutMillis(20000);
122123

123124
// Enable hostname verification.
124125
SSLEngine sslEngine = sslHandler.engine();

networking/src/main/java/google/registry/networking/handler/SslServerInitializer.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ protected void initChannel(C channel) throws Exception {
139139

140140
logger.atInfo().log("Available Cipher Suites: %s", sslContext.cipherSuites());
141141
SslHandler sslHandler = sslContext.newHandler(channel.alloc());
142+
sslHandler.setHandshakeTimeoutMillis(20000);
143+
142144
if (requireClientCert) {
143145
Promise<X509Certificate> clientCertificatePromise = channel.eventLoop().newPromise();
144146
Future<Channel> unusedFuture =
@@ -159,15 +161,15 @@ protected void initChannel(C channel) throws Exception {
159161
}
160162
logger.atInfo().log(
161163
"""
162-
--SSL Information--
163-
Client Certificate Hash: %s
164-
SSL Protocol: %s
165-
Cipher Suite: %s
166-
Not Before: %s
167-
Not After: %s
168-
Client Certificate Type: %s
169-
Client Certificate Length: %s
170-
""",
164+
--SSL Information--
165+
Client Certificate Hash: %s
166+
SSL Protocol: %s
167+
Cipher Suite: %s
168+
Not Before: %s
169+
Not After: %s
170+
Client Certificate Type: %s
171+
Client Certificate Length: %s
172+
""",
171173
getCertificateHash(clientCertificate),
172174
sslSession.getProtocol(),
173175
sslSession.getCipherSuite(),

proxy/deploy-proxy-for-env.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ do
3131
echo "Updating cluster ${parts[0]} in zone ${parts[1]}..."
3232
gcloud container clusters get-credentials "${parts[0]}" \
3333
--project "${project}" --zone "${parts[1]}"
34-
kubectl apply -f "./kubernetes/proxy-limit-range.yaml" --force
3534
sed s/GCP_PROJECT/${project}/g "./kubernetes/proxy-deployment-${environment}.yaml" | \
3635
kubectl apply -f -
3736
kubectl apply -f "./kubernetes/proxy-service.yaml" --force

proxy/kubernetes/proxy-deployment-production-canary.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ spec:
3333
port: health-check
3434
initialDelaySeconds: 15
3535
periodSeconds: 20
36+
resources:
37+
requests:
38+
cpu: "400m"
39+
memory: "350Mi"
40+
limits:
41+
cpu: "600m"
42+
memory: "512Mi"
3643
imagePullPolicy: Always
3744
args: ["--env", "production_canary"]
3845
env:

proxy/kubernetes/proxy-deployment-production.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ spec:
3333
port: health-check
3434
initialDelaySeconds: 15
3535
periodSeconds: 20
36+
resources:
37+
requests:
38+
cpu: "400m"
39+
memory: "350Mi"
40+
limits:
41+
cpu: "600m"
42+
memory: "512Mi"
3643
imagePullPolicy: Always
3744
args: ["--env", "production"]
3845
env:

proxy/kubernetes/proxy-deployment-sandbox-canary.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ spec:
3333
port: health-check
3434
initialDelaySeconds: 15
3535
periodSeconds: 20
36+
resources:
37+
requests:
38+
cpu: "400m"
39+
memory: "350Mi"
40+
limits:
41+
cpu: "600m"
42+
memory: "512Mi"
3643
imagePullPolicy: Always
3744
args: ["--env", "sandbox_canary", "--log"]
3845
env:

proxy/kubernetes/proxy-deployment-sandbox.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ spec:
3333
port: health-check
3434
initialDelaySeconds: 15
3535
periodSeconds: 20
36+
resources:
37+
requests:
38+
cpu: "400m"
39+
memory: "350Mi"
40+
limits:
41+
cpu: "600m"
42+
memory: "512Mi"
3643
imagePullPolicy: Always
3744
args: ["--env", "sandbox", "--log"]
3845
env:

proxy/kubernetes/proxy-limit-range.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)