How does Kubernetes lngress handles the concurrent request in GKE

3/5/2019

We are currently deploying our spring boot application in kubernetes and using ingress as our loadbalancer. I want to know how does the kubernetes handles the concurrent request, Is there any configuration which i need to be enabled to handle the concurrent request. We have downstream system which has 10 threads and all the threads make a webservice calls to our spring-boot application.I want to how does the kubernetes handles this request concurrently and how does it routes those request to pod We are using google kubernetes engine(gke). we have 2 pod containers are running.enter code here

-- Sid
google-kubernetes-engine
kubernetes
kubernetes-ingress

1 Answer

3/5/2019

Long story short: Ingress has nothing to do with concurrency. Traffic will just come to your application's process the same way regardless of you're deploying Node.js, Ruby or Java or another language...

So it's up to your application runtime (Java/SpringBoot) to figure out how to handle incoming connections and multiple requests happening on these connnections simultaneously (HTTP/1.1 vs HTTP/2 work very differently in this regard, but mostly it's abstracted from the app developer by the framework you're using).

Kubernetes networking is not trivial to understand. This talk provides a good overview of how the traffic flows in a Kubernetes cluster:

Ingress just creates an external load balancer on your cloud provider that sends the traffic back to your "Service" (cluster-internal load balancer). So to fully understand how traffic comes from $CLOUD_PROVIDER's load balancer to your app, you need to understand inner workings of "Kubernetes networking" –and it totally depends on your cloud provider and the network plugin (CNI) it uses.

-- AhmetB - Google
Source: StackOverflow