liveBook · Manning

Service

As explained in Designing Deep Learning Systems: A guide for software engineers

A Kubernetes API resource that provides a stable network endpoint for accessing a set of pods.

A Kubernetes service provides a stable DNS address for reaching a pod whose IP address may change. In distributed training, the job tracker creates a service for the master pod so worker pods can initialize communication without depending on an ephemeral pod IP. section 4.3.3

A distributed-training service coordinates the following responsibilities:

  • Uses the service DNS name as MASTER_ADDR and exposes MASTER_PORT to every training pod. section 4.3.3
  • Provides network connectivity between the master pod and worker pods while Kubernetes schedules the pods. section 4.3.2

Three-pod training group

A three-instance run creates one master pod and two worker pods. All receive WORLD_SIZE=3 and MASTER_PORT=12356; the master has RANK=0, while workers use ranks 1 and 2. Each pod reaches the master through the DNS name intent-classification-1-master-service.

How Designing Deep Learning Systems: A guide for software engineers covers it

How deep it goes
Explains service creation, DNS addressing, environment variables, and observed Kubernetes resources, but not service selector details.
Examples
Uses a three-pod intent-classification run, a ClusterIP master service, kubectl output, and a service-creation code listing.
What it assumes
Assumes familiarity with Kubernetes pods and distributed-training roles while defining why ephemeral pod IPs require stable DNS.
What you can do after
Configure distributed training to locate its master process through a Kubernetes service DNS name.
How it connects
Connects Kubernetes pods, DNS, distributed training, PyTorch process groups, and environment-variable configuration.

Also explained in

Compare how 12 books explain service →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Designing Deep Learning Systems: A guide for software engineers. The section links point to the parts of the book it draws on.