In kubernetes, when we have multiple pods for service do all the http requests from a client gets routed to same pod?
If above is true, what happens when pod is processing(something like a large file upload in chunks) the request and pod goes down. Does the request fail
To summarize:
Kubernetes uses a feature called kube-proxy to handle the virtual IPs for services. Kubernetes allocates tasks to pods within a service by the round-robin method
With round-robin allocation, the system maintains a list of destinations. When a request comes in, it assigns the request to the next destination on the list, then permutes the list (either by simple rotation, or a more complex method), so the next request goes to the following destination on the list.
@c4f4t0r is absolutely right that once you start a file upload session - you will use the same pod and connection. In case something will happen with current connectivity(pod down) - the next session will be established with the next in round robin pod.