GKE Ingress high latency with SSL Certificate

2/19/2020

I've provision a GKE cluster and successfully deploy my web services. I also have the ingress deployed with the SSL Certificate imposed to expose the web services. After that, i've execute time curl and found out the latency of invoking the web service through ingress (HTTPS) is significantly higher compare to HTTP, Which is 10x higher.

  • http - 10-20ms
  • https - 120-200ms

It this something that us expected? as it costing too much for us for just to impose the SSL termination.

Here is the deployment yaml for ingress and services.

Ingress.yaml

piVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: my-service-ingress 
  annotations:
    kubernetes.io/ingress.global-static-ip-name: my-service-ingress
    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  tls:
  - secretName: my-service-ssl
  rules:
  - host: web.my-service.com
    http:
      paths:
      - backend:
          serviceName: my-service
          servicePort: 80

service.yaml

apiVersion: v1
kind: Service
metadata:
  name: my-service 
  labels:
    app: my-service
spec:
  type: NodePort
  selector:
    app: my-service
  ports:
  - port: 80
    protocol: TCP
    targetPort: 80
-- chieh woei teh
google-cloud-platform
google-kubernetes-engine
kubernetes-ingress
ssl

0 Answers