JavaLand 2018 Arun Gupta Service Discovery In Container Orchestration Frameworks
On a cold and wet morning in Phantasialand, my old pal Arun Gupta gave The first regular session at JavaLand 2018. There was an impressive number of attendees, considering the early hour, even before the opening greeting from DOAG CEO Fried Saacke.
The need for service discovery. How else can services know how to communicate with other services? The need for this is even more acute in the cloud when the location and cardinality of the services is highly dynamic. This works best with stateless services.
Examples: Docker Swarm, Kubernetes, Amazon ECS, Mesosphere
Docker for AWS. A cloud formation template, automatic multi-host cluster. Well integrated with AWS constructs: autoscaling, load balancing, logs in CloudWatch.
docker service create --replicas 3 --name web jboss/wildfly
The default: master and four nodes. Three replicas mean you get three replicas of the whole five nodes.
docker service create --replicas 3 --name web -p 8080:8080 jboss/wildfly
The addition of the port configures the load balancer
Docker Compose File
Defines the docker stack, containing your services.
Box diagram of parts of the Kubernetes cluster.
Scheduler and Controller Manager watch the etcd, because the etcd is easily watchable.
The labels are in etcd, this allows the pods and services to be loosely coupled.
We need an ingress LB that allows your service to be seen from the outside.
Arun: 57% of K8s in the world runs on AWS.