SlideShare ist ein Scribd-Unternehmen logo
1 von 15
Linkerd – Service mesh with
service Discovery backend
Leandro Totino Pereira – System Engineer
Orchestration system for containers
Kubernetes – Container system platform based on etcd
Nomad – Container system based on consul
Nomad Kubernetes
Multi-datacenter Native Federation
Multitenancy No Yes
Load Balancing External (consul-templates) Basic Integrated (Services)
Workload Container, java, commands, lxc and
qemu hypervisors based.
Just Containers
Network abstraction Port hypervisor based Port/IP services context based
Multi-Datacenter yes No (federation)
abstrations jobs RC
Load Balancer integration External (consul-template or API) Services (basics load balancer) or API
Service Discovery
Itens Consul Etcd
Cluster protocol Raft (Serf) Raft
Datacenter-aware yes No (Kubernetes federation)
auto-configuration DNS yes no
Service Agents yes no
KV store yes yes
Handler and Watches yes no
events yes no
Benchmark I Result
Tests send 300,000 requests to key/value stores. One with jsonrpc, the other with gRPC. Both jsonrpc and gRPC code use only one TCP
connection. And another gRPC case with one TCP connection but with multiple clients:
Source: https://blog.gopheracademy.com/advent-2015/etcd-distributed-key-value-store-with-grpc-http2/
Benchmark II Result
The output shows that Protocol Buffers outperforms JSON and XML in both marshaling and unmarshaling. The result shows the following
numbers:
:
Protocol Buffers Marshal: 819 ns/op
Protocol Buffers Unmarshal: 1163 ns/op
JSON Marshal: 3316 ns/op
JSON Unmarshal: 7196 ns/op
XML Marshal: 9248 ns/op
XML Unmarshal: 30485 ns/op
Source: https://medium.com/@shijuvar/benchmarking-protocol-buffers-json-and-xml-in-go-57fa89b8525
Linkerd
• linkerd is a transparent proxy that adds service discovery, routing, failure handling, and visibility to modern
software applications
• Integration service discovery
• Handles tens of thousands of requests per second per instance with minimal latency overhead. Scales
horizontally with ease
• Provides dynamic, scoped, logical routing rules, enabling blue-green deployments, staging, canarying, failover,
and more.
• Zipkin, Prometheus and statsd integration
• Multi-container orchestration supported
• Cloud Native Computing Foundation
• 918 commit, 30 contributors, 2244 stars, 30 release
• Slack channel really active
Linkerd – Integration I
Nomad Integration
JOB Specs:
env { NOMAD_HOST=$HOSTNAME }
Kubernetes Integration
YAML Specs:
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: http_proxy
value: $(NODE_NAME):4140
Linkerd Integration II
Container
export http_proxy=$NOMAD_HOST:4140
Test:
For example, if we have a consul servisse named hello, we can resquest passing http header “Host: hello”
curl -sI -H 'Host: hello’ http://
Or if http_proxy is not defined:
curl -sI -H 'Host: hello’ http://$NOMAD_HOST / http://$NODE_NAME
Linkerd – architecture I
Linkerd – architecture II
1 – Application in containers register to service Discovery as service
2 – Linkerd gets services from services Discovery
3 – Application communicate by linkerd through http_proxy variable or directly by node_name
variable.
4 - Containers must connect to linkerd in your own host/hypervisor.
5 – Linkerd balance or forward connection to another linkerd.
Namerd
Dtab and Dentries
Dtab or Delegation tables (dtabs for short) are lists of routing rules (dentries) that take a “logical path”
which looks like to rewrite url paths.
Dtabs can (and often do) have more than one dentry. For example, we could list several stores:
3 - /smitten => /USA/CA/SF/Octavia/432;
2 - /iceCreamStore => /smitten;
1 - /iceCreamStore => /humphrys;
When we try to resolve a path that matches more than one prefix, bottom dentries take precedence.
So the path /iceCreamStore/try/allFlavors would resolve first as /humphrys/try/allFlavors. However, if
the address for humphrys is unknown (as in this example), we fall back to /smitten/try/allFlavors,
which ultimately resolves to /USA/CA/SF/Octavia/432/try/allFlavors.
Namers– Service discovery
Config Consul/Nomad:
namers:
- kind: io.l5d.consul
host: [ consul server ]
port: 2181
includeTag: true
useHealthCheck: true
Routing:
dtab: |
/svc => /#/io.l5d.consul/dc1/prod;
Config k8s:
namers:
- kind: io.l5d.k8s
host: ip [k8s master]
port: 8001
labelSelector: version
Routing:
dtab: |
/svc => /#/io.l5d.k8s/prod/http;
A namer binds a concrete name to a physical address which is used to setup service discovery backend
access.
Zipkin integration
Config:
telemetry:
- kind: io.l5d.zipkin
host: [zipkin-host]
port: 9410
sampleRate: 1.0
Thank you!
Question?
More information:
Linkedin
https://www.linkedin.com/in/leandro-totino-pereira-
06726227
Facebook:
https://www.facebook.com/leandro.totinopereira

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Load Balancing in the Cloud using Nginx & Kubernetes
Load Balancing in the Cloud using Nginx & KubernetesLoad Balancing in the Cloud using Nginx & Kubernetes
Load Balancing in the Cloud using Nginx & Kubernetes
 
Application Rollout - Istio
Application Rollout - Istio Application Rollout - Istio
Application Rollout - Istio
 
KubeCon NA 2017: Ambassador and Envoy (Envoy Salon)
KubeCon NA 2017: Ambassador and Envoy (Envoy Salon)KubeCon NA 2017: Ambassador and Envoy (Envoy Salon)
KubeCon NA 2017: Ambassador and Envoy (Envoy Salon)
 
Security Tips to run Docker in Production
Security Tips to run Docker in ProductionSecurity Tips to run Docker in Production
Security Tips to run Docker in Production
 
Kubernetes debug like a pro
Kubernetes debug like a proKubernetes debug like a pro
Kubernetes debug like a pro
 
Network Service Mesh
Network Service MeshNetwork Service Mesh
Network Service Mesh
 
Service discovery in a microservice architecture using consul
Service discovery in a microservice architecture using consulService discovery in a microservice architecture using consul
Service discovery in a microservice architecture using consul
 
Microservice 4.0 Journey - From Spring NetFlix OSS to Istio Service Mesh and ...
Microservice 4.0 Journey - From Spring NetFlix OSS to Istio Service Mesh and ...Microservice 4.0 Journey - From Spring NetFlix OSS to Istio Service Mesh and ...
Microservice 4.0 Journey - From Spring NetFlix OSS to Istio Service Mesh and ...
 
Service mesh with istio
Service mesh with istioService mesh with istio
Service mesh with istio
 
Load Balancing for Containers and Cloud Native Architecture
Load Balancing for Containers and Cloud Native ArchitectureLoad Balancing for Containers and Cloud Native Architecture
Load Balancing for Containers and Cloud Native Architecture
 
WTF Do We Need a Service Mesh?
WTF Do We Need a Service Mesh? WTF Do We Need a Service Mesh?
WTF Do We Need a Service Mesh?
 
Securing Microservices with Istio
Securing Microservices with IstioSecuring Microservices with Istio
Securing Microservices with Istio
 
Istio: Using nginMesh as the service proxy
Istio: Using nginMesh as the service proxyIstio: Using nginMesh as the service proxy
Istio: Using nginMesh as the service proxy
 
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ... The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 
Container world hybridnetworking_rev2
Container world hybridnetworking_rev2Container world hybridnetworking_rev2
Container world hybridnetworking_rev2
 
Kubernetes 1.16 and rancher 2.3 enhancements
Kubernetes 1.16 and rancher 2.3 enhancementsKubernetes 1.16 and rancher 2.3 enhancements
Kubernetes 1.16 and rancher 2.3 enhancements
 
Connecting All Abstractions with Istio
Connecting All Abstractions with IstioConnecting All Abstractions with Istio
Connecting All Abstractions with Istio
 
istio: service mesh for all
istio: service mesh for allistio: service mesh for all
istio: service mesh for all
 
How and why we got Prometheus working with Docker Swarm
How and why we got Prometheus working with Docker SwarmHow and why we got Prometheus working with Docker Swarm
How and why we got Prometheus working with Docker Swarm
 
NYC Kubernetes Meetup: Ambassador and Istio - Flynn, Datawire
NYC Kubernetes Meetup: Ambassador and Istio - Flynn, DatawireNYC Kubernetes Meetup: Ambassador and Istio - Flynn, Datawire
NYC Kubernetes Meetup: Ambassador and Istio - Flynn, Datawire
 

Ähnlich wie Linkerd – Service mesh with service Discovery backend

Running gRPC Services for Serving Legacy API on Kubernetes
Running gRPC Services for Serving Legacy API on KubernetesRunning gRPC Services for Serving Legacy API on Kubernetes
Running gRPC Services for Serving Legacy API on Kubernetes
Sungwon Lee
 

Ähnlich wie Linkerd – Service mesh with service Discovery backend (20)

Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Kubernetes on AWS
Kubernetes on AWSKubernetes on AWS
Kubernetes on AWS
 
Kubernetes on AWS
Kubernetes on AWSKubernetes on AWS
Kubernetes on AWS
 
Ingress overview
Ingress overviewIngress overview
Ingress overview
 
DCEU 18: Docker Container Networking
DCEU 18: Docker Container NetworkingDCEU 18: Docker Container Networking
DCEU 18: Docker Container Networking
 
Running gRPC Services for Serving Legacy API on Kubernetes
Running gRPC Services for Serving Legacy API on KubernetesRunning gRPC Services for Serving Legacy API on Kubernetes
Running gRPC Services for Serving Legacy API on Kubernetes
 
Hands on with CoAP and Californium
Hands on with CoAP and CaliforniumHands on with CoAP and Californium
Hands on with CoAP and Californium
 
Scaling docker with kubernetes
Scaling docker with kubernetesScaling docker with kubernetes
Scaling docker with kubernetes
 
Introduction to CloudStack API
Introduction to CloudStack APIIntroduction to CloudStack API
Introduction to CloudStack API
 
2020.02.15 DelEx - CI/CD in AWS Cloud
2020.02.15 DelEx - CI/CD in AWS Cloud2020.02.15 DelEx - CI/CD in AWS Cloud
2020.02.15 DelEx - CI/CD in AWS Cloud
 
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
KubeCon EU 2016: Creating an Advanced Load Balancing Solution for Kubernetes ...
 
Building and running Spring Cloud-based microservices on AWS ECS
Building and running Spring Cloud-based microservices on AWS ECSBuilding and running Spring Cloud-based microservices on AWS ECS
Building and running Spring Cloud-based microservices on AWS ECS
 
Kubernetes @ Nanit
Kubernetes @ NanitKubernetes @ Nanit
Kubernetes @ Nanit
 
Evolution of kube-proxy (Brussels, Fosdem 2020)
Evolution of kube-proxy (Brussels, Fosdem 2020)Evolution of kube-proxy (Brussels, Fosdem 2020)
Evolution of kube-proxy (Brussels, Fosdem 2020)
 
Kubernetes @ Nanit by Chen Fisher
Kubernetes @ Nanit by Chen FisherKubernetes @ Nanit by Chen Fisher
Kubernetes @ Nanit by Chen Fisher
 
Demystfying container-networking
Demystfying container-networkingDemystfying container-networking
Demystfying container-networking
 
ОЛЕКСАНДР ЛИПКО «Graceful Shutdown Node.js + k8s» Online WDDay 2021
ОЛЕКСАНДР ЛИПКО «Graceful Shutdown Node.js + k8s» Online WDDay 2021ОЛЕКСАНДР ЛИПКО «Graceful Shutdown Node.js + k8s» Online WDDay 2021
ОЛЕКСАНДР ЛИПКО «Graceful Shutdown Node.js + k8s» Online WDDay 2021
 
Container orchestration from theory to practice
Container orchestration from theory to practiceContainer orchestration from theory to practice
Container orchestration from theory to practice
 
Kubernetes and docker
Kubernetes and dockerKubernetes and docker
Kubernetes and docker
 
Kubernetes on open stack
Kubernetes on open stackKubernetes on open stack
Kubernetes on open stack
 

Mehr von Leandro Totino Pereira

Mehr von Leandro Totino Pereira (9)

Backup multi-cloud solution based on named pipes
Backup multi-cloud solution based on named pipesBackup multi-cloud solution based on named pipes
Backup multi-cloud solution based on named pipes
 
Zabbix at scale with Elasticsearch
Zabbix at scale with ElasticsearchZabbix at scale with Elasticsearch
Zabbix at scale with Elasticsearch
 
Discover/Register Everything in consul
Discover/Register Everything in consulDiscover/Register Everything in consul
Discover/Register Everything in consul
 
Monitoring at scale - Sensu Kafka Kafka-connect Cassandra PrestoDB
Monitoring at scale - Sensu Kafka Kafka-connect Cassandra PrestoDBMonitoring at scale - Sensu Kafka Kafka-connect Cassandra PrestoDB
Monitoring at scale - Sensu Kafka Kafka-connect Cassandra PrestoDB
 
Automate schedule
Automate scheduleAutomate schedule
Automate schedule
 
Real time analytics
Real time analyticsReal time analytics
Real time analytics
 
Gocd – Kubernetes/Nomad Continuous Deployment
Gocd – Kubernetes/Nomad Continuous DeploymentGocd – Kubernetes/Nomad Continuous Deployment
Gocd – Kubernetes/Nomad Continuous Deployment
 
DynomiteDB - No spof High-availability Redis cluster solution
DynomiteDB -  No spof High-availability Redis cluster solutionDynomiteDB -  No spof High-availability Redis cluster solution
DynomiteDB - No spof High-availability Redis cluster solution
 
DalmatinerDB and cockroachDB monitoring plataform
DalmatinerDB and cockroachDB monitoring plataformDalmatinerDB and cockroachDB monitoring plataform
DalmatinerDB and cockroachDB monitoring plataform
 

Kürzlich hochgeladen

Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
chumtiyababu
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Kürzlich hochgeladen (20)

Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEGEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 

Linkerd – Service mesh with service Discovery backend

  • 1. Linkerd – Service mesh with service Discovery backend Leandro Totino Pereira – System Engineer
  • 2. Orchestration system for containers Kubernetes – Container system platform based on etcd Nomad – Container system based on consul Nomad Kubernetes Multi-datacenter Native Federation Multitenancy No Yes Load Balancing External (consul-templates) Basic Integrated (Services) Workload Container, java, commands, lxc and qemu hypervisors based. Just Containers Network abstraction Port hypervisor based Port/IP services context based Multi-Datacenter yes No (federation) abstrations jobs RC Load Balancer integration External (consul-template or API) Services (basics load balancer) or API
  • 3. Service Discovery Itens Consul Etcd Cluster protocol Raft (Serf) Raft Datacenter-aware yes No (Kubernetes federation) auto-configuration DNS yes no Service Agents yes no KV store yes yes Handler and Watches yes no events yes no
  • 4. Benchmark I Result Tests send 300,000 requests to key/value stores. One with jsonrpc, the other with gRPC. Both jsonrpc and gRPC code use only one TCP connection. And another gRPC case with one TCP connection but with multiple clients: Source: https://blog.gopheracademy.com/advent-2015/etcd-distributed-key-value-store-with-grpc-http2/
  • 5. Benchmark II Result The output shows that Protocol Buffers outperforms JSON and XML in both marshaling and unmarshaling. The result shows the following numbers: : Protocol Buffers Marshal: 819 ns/op Protocol Buffers Unmarshal: 1163 ns/op JSON Marshal: 3316 ns/op JSON Unmarshal: 7196 ns/op XML Marshal: 9248 ns/op XML Unmarshal: 30485 ns/op Source: https://medium.com/@shijuvar/benchmarking-protocol-buffers-json-and-xml-in-go-57fa89b8525
  • 6. Linkerd • linkerd is a transparent proxy that adds service discovery, routing, failure handling, and visibility to modern software applications • Integration service discovery • Handles tens of thousands of requests per second per instance with minimal latency overhead. Scales horizontally with ease • Provides dynamic, scoped, logical routing rules, enabling blue-green deployments, staging, canarying, failover, and more. • Zipkin, Prometheus and statsd integration • Multi-container orchestration supported • Cloud Native Computing Foundation • 918 commit, 30 contributors, 2244 stars, 30 release • Slack channel really active
  • 7. Linkerd – Integration I Nomad Integration JOB Specs: env { NOMAD_HOST=$HOSTNAME } Kubernetes Integration YAML Specs: env: - name: NODE_NAME valueFrom: fieldRef: fieldPath: spec.nodeName - name: POD_IP valueFrom: fieldRef: fieldPath: status.podIP - name: http_proxy value: $(NODE_NAME):4140
  • 8. Linkerd Integration II Container export http_proxy=$NOMAD_HOST:4140 Test: For example, if we have a consul servisse named hello, we can resquest passing http header “Host: hello” curl -sI -H 'Host: hello’ http:// Or if http_proxy is not defined: curl -sI -H 'Host: hello’ http://$NOMAD_HOST / http://$NODE_NAME
  • 10. Linkerd – architecture II 1 – Application in containers register to service Discovery as service 2 – Linkerd gets services from services Discovery 3 – Application communicate by linkerd through http_proxy variable or directly by node_name variable. 4 - Containers must connect to linkerd in your own host/hypervisor. 5 – Linkerd balance or forward connection to another linkerd.
  • 12. Dtab and Dentries Dtab or Delegation tables (dtabs for short) are lists of routing rules (dentries) that take a “logical path” which looks like to rewrite url paths. Dtabs can (and often do) have more than one dentry. For example, we could list several stores: 3 - /smitten => /USA/CA/SF/Octavia/432; 2 - /iceCreamStore => /smitten; 1 - /iceCreamStore => /humphrys; When we try to resolve a path that matches more than one prefix, bottom dentries take precedence. So the path /iceCreamStore/try/allFlavors would resolve first as /humphrys/try/allFlavors. However, if the address for humphrys is unknown (as in this example), we fall back to /smitten/try/allFlavors, which ultimately resolves to /USA/CA/SF/Octavia/432/try/allFlavors.
  • 13. Namers– Service discovery Config Consul/Nomad: namers: - kind: io.l5d.consul host: [ consul server ] port: 2181 includeTag: true useHealthCheck: true Routing: dtab: | /svc => /#/io.l5d.consul/dc1/prod; Config k8s: namers: - kind: io.l5d.k8s host: ip [k8s master] port: 8001 labelSelector: version Routing: dtab: | /svc => /#/io.l5d.k8s/prod/http; A namer binds a concrete name to a physical address which is used to setup service discovery backend access.
  • 14. Zipkin integration Config: telemetry: - kind: io.l5d.zipkin host: [zipkin-host] port: 9410 sampleRate: 1.0