SlideShare ist ein Scribd-Unternehmen logo
1 von 16
Downloaden Sie, um offline zu lesen
Pierre Souchay
Discovery Team @Criteo
Twitter: @vizionr
Github: pierresouchay
Consul
templates
on steroids
Leading Discovery Team @Criteo (SDKs + Consul)
Dealing with 240k+ services, 38k+ Consul nodes in 9 DCs
1st external contributor to Consul
Author of consul-templaterb
Why consul-templaterb?
Easier for complex templates
• ERB is nicer, more powerful than Golang templating
• Structured output formats (JSON, XML, YAML…)
• Hot-Reload, includes, lazy evaluation
• You can create a full featured GUI!
• Handle Consul compatibility for features (ex: meta)
• OSS with examples: https://github.com/criteo/consul-templaterb/
Why consul-templaterb?
Very High performance on large clusters
• More optimized for performance on large clusters: 800M/s -> 12k/s
• Bandwidth usage / endpoint (debug)
• Optimizations built-in per-endpoints
Why consul-templaterb?
Good compatibility with Consul-Template
• Most of features are present (process baby-sitting), reload commands…
• Many of the flags are compatible (using the same syntax, eg: --template)
How it works internally…
while (true) {
data = compute_template()
ready = download_update_data_async()
if (ready) {
write_output_to_file(data)
}
}
Well documented API
• API is fully documented
• https://github.com/criteo/consul-templaterb/blob/master/TemplateAPI.md
• Includes links to real world examples
• API includes regression tests
• All samples are always tested at build time and all working!
• Output of APIs is unit-tested
• Many samples (HTML, YAML, JSON, text, full HTML5 GUI)
• https://github.com/criteo/consul-templaterb/tree/master/samples
A nice API with sensitive defaults
<%
result = {}
services(tag:"webscale").each do |srv, tags|
result[srv] = {'passing' => 0, 'warning' => 0, 'critical' => 0}
service(srv).each do |snode|
result[srv][snode.status] += 1
end
end
%><%= JSON.pretty_generate(result) %>
A nice API with sensitive defaults
<%
result = {}
services(tag:"webscale").each do |srv, tags|
result[srv] = {'passing' => 0, 'warning' => 0, 'critical' => 0}
service(srv).each do |snode|
result[srv][snode.status] += 1
end
end
%><%= JSON.pretty_generate(result) %>
{
"chef-server": {
"passing": 11,
"warning": 0,
"critical": 0
},
"chef-webscale": {
"passing": 3,
"warning": 0,
"critical": 0
},
"chef-webscale-backend": {
"passing": 1,
"warning": 0,
"critical": 0
},
"host-arbitrage": {
"passing": 388,
"warning": 0,
"critical": 2
[…]
A nice API with sensitive defaults
<%
result = {}
services(tag:"webscale").each do |srv, tags|
result[srv] = {'passing' => 0, 'warning' => 0, 'critical' => 0}
service(srv).each do |snode|
result[srv][snode.status] += 1
end
end
%><%= YAML.dump(result) %>
A nice API with sensitive defaults
<%
result = {}
services(tag:"webscale").each do |srv, tags|
result[srv] = {'passing' => 0, 'warning' => 0, 'critical' => 0}
service(srv).each do |snode|
result[srv][snode.status] += 1
end
end
%><%= YAML.dump(result) %>
---
chef-server:
passing: 11
warning: 0
critical: 0
chef-webscale:
passing: 3
warning: 0
critical: 0
chef-webscale-backend:
passing: 1
warning: 0
critical: 0
host-arbitrage:
passing: 388
warning: 0
critical: 2
host-arbitrage-admin:
passing: 388
warning: 0
[…]
A nice API with sensitive defaults
<%
result = {}
services(tag:"webscale").each do |srv, tags|
result[srv] = {'passing' => 0, 'warning' => 0, 'critical' => 0}
datacenters.each do |dc|
service(srv, dc:dc).each do |snode|
result[srv][snode.status] += 1
end
end
end
%><%= YAML.dump(result) %>
A nice API with sensitive defaults
<%
result = {}
services(tag:"webscale").each do |srv, tags|
result[srv] = {'passing' => 0, 'warning' => 0, 'critical' => 0}
datacenters.each do |dc|
service(srv, dc:dc).each do |snode|
result[srv][snode.status] += 1
end
end
end
%><%= YAML.dump(result) %>
---
chef-server:
passing: 25
warning: 0
critical: 0
chef-webscale:
passing: 3
warning: 0
critical: 0
chef-webscale-backend:
passing: 1
warning: 0
critical: 0
host-arbitrage:
passing: 4493
warning: 0
critical: 23
host-arbitrage-admin:
passing: 4493
warning: 0
[…]
Demo Time!
• Using ruby gems
gem install consul-templaterb
consul-templaterb --help
• Using docker for the GUI:
https://hub.docker.com/r/discoverycriteo/consul-templaterb
History of Services in a large Consul Cluster
Highly scalable UI (1000s of users)
See how we are using it to build new Stuff
Tomorrow at Sep 11 | 3:20 PM - 3:55 PM at Elwha A | Level 5
Inversion Of Control with Consul
https://hashiconf.hashicorp.com/schedule/inversion-of-control-with-consul
Slides: https://www.slideshare.net/PierreSouchay/2019-hashiconf-seattleconsulioc
Other resources:
https://www.hashicorp.com/resources/operating-consul-at-scale
https://www.hashicorp.com/resources/criteo-containers-consul-connect

Weitere ähnliche Inhalte

Was ist angesagt?

Infrastructure development using Consul
Infrastructure development using ConsulInfrastructure development using Consul
Infrastructure development using ConsulGrid Dynamics
 
Mistral Atlanta design session
Mistral Atlanta design sessionMistral Atlanta design session
Mistral Atlanta design sessionRenat Akhmerov
 
Consul: Microservice Enabling Microservices and Reactive Programming
Consul: Microservice Enabling Microservices and Reactive ProgrammingConsul: Microservice Enabling Microservices and Reactive Programming
Consul: Microservice Enabling Microservices and Reactive ProgrammingRick Hightower
 
Spring Cloud and Netflix Components
Spring Cloud and Netflix ComponentsSpring Cloud and Netflix Components
Spring Cloud and Netflix ComponentsDharshan Sastry B N
 
Service Discovery in Distributed Systems
Service Discovery in Distributed SystemsService Discovery in Distributed Systems
Service Discovery in Distributed SystemsIvan Voroshilin
 
Microservices with docker swarm and consul
Microservices with docker swarm and consulMicroservices with docker swarm and consul
Microservices with docker swarm and consulNguyen Sy Thanh Son
 
Building Microservices with Spring Cloud and Netflix OSS
Building Microservices with Spring Cloud and Netflix OSSBuilding Microservices with Spring Cloud and Netflix OSS
Building Microservices with Spring Cloud and Netflix OSSSemih Hakkıoğlu
 
Consul First Steps
Consul First StepsConsul First Steps
Consul First StepsMarc Cluet
 
PyCon India 2012: Celery Talk
PyCon India 2012: Celery TalkPyCon India 2012: Celery Talk
PyCon India 2012: Celery TalkPiyush Kumar
 
OSDN: Serverless technologies with Kubernetes
OSDN: Serverless technologies with Kubernetes OSDN: Serverless technologies with Kubernetes
OSDN: Serverless technologies with Kubernetes Provectus
 
What is serveless?
What is serveless? What is serveless?
What is serveless? Provectus
 
Network Infrastructure as Code with Chef and Cisco
Network Infrastructure as Code with Chef and CiscoNetwork Infrastructure as Code with Chef and Cisco
Network Infrastructure as Code with Chef and CiscoMatt Ray
 
Introduction to service discovery and self-organizing cluster orchestration. ...
Introduction to service discovery and self-organizing cluster orchestration. ...Introduction to service discovery and self-organizing cluster orchestration. ...
Introduction to service discovery and self-organizing cluster orchestration. ...Pivorak MeetUp
 
Building Angular 2.0 applications with TypeScript
Building Angular 2.0 applications with TypeScriptBuilding Angular 2.0 applications with TypeScript
Building Angular 2.0 applications with TypeScriptMSDEVMTL
 
Zero to #Serverless in 60 seconds, anywhere
Zero to #Serverless in 60 seconds, anywhereZero to #Serverless in 60 seconds, anywhere
Zero to #Serverless in 60 seconds, anywhereAlex Ellis
 
Building a Cloud Native Service - Docker Meetup Santa Clara (July 20, 2017)
Building a Cloud Native Service - Docker Meetup Santa Clara (July 20, 2017)Building a Cloud Native Service - Docker Meetup Santa Clara (July 20, 2017)
Building a Cloud Native Service - Docker Meetup Santa Clara (July 20, 2017)Yong Tang
 
Docker Service Registration and Discovery
Docker Service Registration and DiscoveryDocker Service Registration and Discovery
Docker Service Registration and Discoverym_richardson
 
Puppet Keynote: Puppet Camp London
Puppet Keynote: Puppet Camp LondonPuppet Keynote: Puppet Camp London
Puppet Keynote: Puppet Camp LondonPuppet
 
Architectural changes in the repo in 6.1 and beyond
Architectural changes in the repo in 6.1 and beyondArchitectural changes in the repo in 6.1 and beyond
Architectural changes in the repo in 6.1 and beyondStefan Kopf
 

Was ist angesagt? (20)

Infrastructure development using Consul
Infrastructure development using ConsulInfrastructure development using Consul
Infrastructure development using Consul
 
Mistral Atlanta design session
Mistral Atlanta design sessionMistral Atlanta design session
Mistral Atlanta design session
 
Service Discovery 101
Service Discovery 101Service Discovery 101
Service Discovery 101
 
Consul: Microservice Enabling Microservices and Reactive Programming
Consul: Microservice Enabling Microservices and Reactive ProgrammingConsul: Microservice Enabling Microservices and Reactive Programming
Consul: Microservice Enabling Microservices and Reactive Programming
 
Spring Cloud and Netflix Components
Spring Cloud and Netflix ComponentsSpring Cloud and Netflix Components
Spring Cloud and Netflix Components
 
Service Discovery in Distributed Systems
Service Discovery in Distributed SystemsService Discovery in Distributed Systems
Service Discovery in Distributed Systems
 
Microservices with docker swarm and consul
Microservices with docker swarm and consulMicroservices with docker swarm and consul
Microservices with docker swarm and consul
 
Building Microservices with Spring Cloud and Netflix OSS
Building Microservices with Spring Cloud and Netflix OSSBuilding Microservices with Spring Cloud and Netflix OSS
Building Microservices with Spring Cloud and Netflix OSS
 
Consul First Steps
Consul First StepsConsul First Steps
Consul First Steps
 
PyCon India 2012: Celery Talk
PyCon India 2012: Celery TalkPyCon India 2012: Celery Talk
PyCon India 2012: Celery Talk
 
OSDN: Serverless technologies with Kubernetes
OSDN: Serverless technologies with Kubernetes OSDN: Serverless technologies with Kubernetes
OSDN: Serverless technologies with Kubernetes
 
What is serveless?
What is serveless? What is serveless?
What is serveless?
 
Network Infrastructure as Code with Chef and Cisco
Network Infrastructure as Code with Chef and CiscoNetwork Infrastructure as Code with Chef and Cisco
Network Infrastructure as Code with Chef and Cisco
 
Introduction to service discovery and self-organizing cluster orchestration. ...
Introduction to service discovery and self-organizing cluster orchestration. ...Introduction to service discovery and self-organizing cluster orchestration. ...
Introduction to service discovery and self-organizing cluster orchestration. ...
 
Building Angular 2.0 applications with TypeScript
Building Angular 2.0 applications with TypeScriptBuilding Angular 2.0 applications with TypeScript
Building Angular 2.0 applications with TypeScript
 
Zero to #Serverless in 60 seconds, anywhere
Zero to #Serverless in 60 seconds, anywhereZero to #Serverless in 60 seconds, anywhere
Zero to #Serverless in 60 seconds, anywhere
 
Building a Cloud Native Service - Docker Meetup Santa Clara (July 20, 2017)
Building a Cloud Native Service - Docker Meetup Santa Clara (July 20, 2017)Building a Cloud Native Service - Docker Meetup Santa Clara (July 20, 2017)
Building a Cloud Native Service - Docker Meetup Santa Clara (July 20, 2017)
 
Docker Service Registration and Discovery
Docker Service Registration and DiscoveryDocker Service Registration and Discovery
Docker Service Registration and Discovery
 
Puppet Keynote: Puppet Camp London
Puppet Keynote: Puppet Camp LondonPuppet Keynote: Puppet Camp London
Puppet Keynote: Puppet Camp London
 
Architectural changes in the repo in 6.1 and beyond
Architectural changes in the repo in 6.1 and beyondArchitectural changes in the repo in 6.1 and beyond
Architectural changes in the repo in 6.1 and beyond
 

Ähnlich wie 2019 hashiconf consul-templaterb

Serverless in-action
Serverless in-actionServerless in-action
Serverless in-actionAssaf Gannon
 
Automated acceptance test
Automated acceptance testAutomated acceptance test
Automated acceptance testBryan Liu
 
Presto anatomy
Presto anatomyPresto anatomy
Presto anatomyDongmin Yu
 
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & MobileIVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & MobileAmazon Web Services Japan
 
[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기NAVER D2
 
How and why we evolved a legacy Java web application to Scala... and we are s...
How and why we evolved a legacy Java web application to Scala... and we are s...How and why we evolved a legacy Java web application to Scala... and we are s...
How and why we evolved a legacy Java web application to Scala... and we are s...Katia Aresti
 
A Guide to Event-Driven SRE-inspired DevOps
A Guide to Event-Driven SRE-inspired DevOpsA Guide to Event-Driven SRE-inspired DevOps
A Guide to Event-Driven SRE-inspired DevOpsAndreas Grabner
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop OverviewShubhra Kar
 
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on RailsAvi Kedar
 
Real world #microservices with Apache Camel, Fabric8, and OpenShift
Real world #microservices with Apache Camel, Fabric8, and OpenShiftReal world #microservices with Apache Camel, Fabric8, and OpenShift
Real world #microservices with Apache Camel, Fabric8, and OpenShiftChristian Posta
 
Real-world #microservices with Apache Camel, Fabric8, and OpenShift
Real-world #microservices with Apache Camel, Fabric8, and OpenShiftReal-world #microservices with Apache Camel, Fabric8, and OpenShift
Real-world #microservices with Apache Camel, Fabric8, and OpenShiftChristian Posta
 
Apache Samza 1.0 - What's New, What's Next
Apache Samza 1.0 - What's New, What's NextApache Samza 1.0 - What's New, What's Next
Apache Samza 1.0 - What's New, What's NextPrateek Maheshwari
 
Jenkins Online Meetup - Automated SLI based Build Validation with Keptn
Jenkins Online Meetup - Automated SLI based Build Validation with KeptnJenkins Online Meetup - Automated SLI based Build Validation with Keptn
Jenkins Online Meetup - Automated SLI based Build Validation with KeptnAndreas Grabner
 
Microservice Automated Testing on Kubernetes
Microservice Automated Testing on KubernetesMicroservice Automated Testing on Kubernetes
Microservice Automated Testing on KubernetesShane Galvin
 
Connecting the Dots: Kong for GraphQL Endpoints
Connecting the Dots: Kong for GraphQL EndpointsConnecting the Dots: Kong for GraphQL Endpoints
Connecting the Dots: Kong for GraphQL EndpointsJulien Bataillé
 
Building production websites with Node.js on the Microsoft stack
Building production websites with Node.js on the Microsoft stackBuilding production websites with Node.js on the Microsoft stack
Building production websites with Node.js on the Microsoft stackCellarTracker
 
Mасштабирование микросервисов на Go, Matt Heath (Hailo)
Mасштабирование микросервисов на Go, Matt Heath (Hailo)Mасштабирование микросервисов на Go, Matt Heath (Hailo)
Mасштабирование микросервисов на Go, Matt Heath (Hailo)Ontico
 

Ähnlich wie 2019 hashiconf consul-templaterb (20)

Serverless in-action
Serverless in-actionServerless in-action
Serverless in-action
 
Wider than rails
Wider than railsWider than rails
Wider than rails
 
Automated acceptance test
Automated acceptance testAutomated acceptance test
Automated acceptance test
 
Presto anatomy
Presto anatomyPresto anatomy
Presto anatomy
 
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & MobileIVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
 
[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기
 
How and why we evolved a legacy Java web application to Scala... and we are s...
How and why we evolved a legacy Java web application to Scala... and we are s...How and why we evolved a legacy Java web application to Scala... and we are s...
How and why we evolved a legacy Java web application to Scala... and we are s...
 
A Guide to Event-Driven SRE-inspired DevOps
A Guide to Event-Driven SRE-inspired DevOpsA Guide to Event-Driven SRE-inspired DevOps
A Guide to Event-Driven SRE-inspired DevOps
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop Overview
 
(Re)discover your AEM
(Re)discover your AEM(Re)discover your AEM
(Re)discover your AEM
 
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on Rails
 
Real world #microservices with Apache Camel, Fabric8, and OpenShift
Real world #microservices with Apache Camel, Fabric8, and OpenShiftReal world #microservices with Apache Camel, Fabric8, and OpenShift
Real world #microservices with Apache Camel, Fabric8, and OpenShift
 
Real-world #microservices with Apache Camel, Fabric8, and OpenShift
Real-world #microservices with Apache Camel, Fabric8, and OpenShiftReal-world #microservices with Apache Camel, Fabric8, and OpenShift
Real-world #microservices with Apache Camel, Fabric8, and OpenShift
 
Apache Samza 1.0 - What's New, What's Next
Apache Samza 1.0 - What's New, What's NextApache Samza 1.0 - What's New, What's Next
Apache Samza 1.0 - What's New, What's Next
 
Jenkins Online Meetup - Automated SLI based Build Validation with Keptn
Jenkins Online Meetup - Automated SLI based Build Validation with KeptnJenkins Online Meetup - Automated SLI based Build Validation with Keptn
Jenkins Online Meetup - Automated SLI based Build Validation with Keptn
 
Node azure
Node azureNode azure
Node azure
 
Microservice Automated Testing on Kubernetes
Microservice Automated Testing on KubernetesMicroservice Automated Testing on Kubernetes
Microservice Automated Testing on Kubernetes
 
Connecting the Dots: Kong for GraphQL Endpoints
Connecting the Dots: Kong for GraphQL EndpointsConnecting the Dots: Kong for GraphQL Endpoints
Connecting the Dots: Kong for GraphQL Endpoints
 
Building production websites with Node.js on the Microsoft stack
Building production websites with Node.js on the Microsoft stackBuilding production websites with Node.js on the Microsoft stack
Building production websites with Node.js on the Microsoft stack
 
Mасштабирование микросервисов на Go, Matt Heath (Hailo)
Mасштабирование микросервисов на Go, Matt Heath (Hailo)Mасштабирование микросервисов на Go, Matt Heath (Hailo)
Mасштабирование микросервисов на Go, Matt Heath (Hailo)
 

Kürzlich hochgeladen

Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirtrahman018755
 
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制pxcywzqs
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查ydyuyu
 
Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftAanSulistiyo
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查ydyuyu
 
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime NagercoilNagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoilmeghakumariji156
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrHenryBriggs2
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtrahman018755
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsMonica Sydney
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdfMatthew Sinclair
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdfMatthew Sinclair
 
75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptx75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptxAsmae Rabhi
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdfMatthew Sinclair
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsMonica Sydney
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"growthgrids
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge GraphsEleniIlkou
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfJOHNBEBONYAP1
 
Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.krishnachandrapal52
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样ayvbos
 

Kürzlich hochgeladen (20)

Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
 
Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck Microsoft
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
 
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime NagercoilNagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirt
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
 
75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptx75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptx
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
 
Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
 

2019 hashiconf consul-templaterb

  • 1. Pierre Souchay Discovery Team @Criteo Twitter: @vizionr Github: pierresouchay Consul templates on steroids Leading Discovery Team @Criteo (SDKs + Consul) Dealing with 240k+ services, 38k+ Consul nodes in 9 DCs 1st external contributor to Consul Author of consul-templaterb
  • 2. Why consul-templaterb? Easier for complex templates • ERB is nicer, more powerful than Golang templating • Structured output formats (JSON, XML, YAML…) • Hot-Reload, includes, lazy evaluation • You can create a full featured GUI! • Handle Consul compatibility for features (ex: meta) • OSS with examples: https://github.com/criteo/consul-templaterb/
  • 3. Why consul-templaterb? Very High performance on large clusters • More optimized for performance on large clusters: 800M/s -> 12k/s • Bandwidth usage / endpoint (debug) • Optimizations built-in per-endpoints
  • 4. Why consul-templaterb? Good compatibility with Consul-Template • Most of features are present (process baby-sitting), reload commands… • Many of the flags are compatible (using the same syntax, eg: --template)
  • 5. How it works internally… while (true) { data = compute_template() ready = download_update_data_async() if (ready) { write_output_to_file(data) } }
  • 6. Well documented API • API is fully documented • https://github.com/criteo/consul-templaterb/blob/master/TemplateAPI.md • Includes links to real world examples • API includes regression tests • All samples are always tested at build time and all working! • Output of APIs is unit-tested • Many samples (HTML, YAML, JSON, text, full HTML5 GUI) • https://github.com/criteo/consul-templaterb/tree/master/samples
  • 7. A nice API with sensitive defaults <% result = {} services(tag:"webscale").each do |srv, tags| result[srv] = {'passing' => 0, 'warning' => 0, 'critical' => 0} service(srv).each do |snode| result[srv][snode.status] += 1 end end %><%= JSON.pretty_generate(result) %>
  • 8. A nice API with sensitive defaults <% result = {} services(tag:"webscale").each do |srv, tags| result[srv] = {'passing' => 0, 'warning' => 0, 'critical' => 0} service(srv).each do |snode| result[srv][snode.status] += 1 end end %><%= JSON.pretty_generate(result) %> { "chef-server": { "passing": 11, "warning": 0, "critical": 0 }, "chef-webscale": { "passing": 3, "warning": 0, "critical": 0 }, "chef-webscale-backend": { "passing": 1, "warning": 0, "critical": 0 }, "host-arbitrage": { "passing": 388, "warning": 0, "critical": 2 […]
  • 9. A nice API with sensitive defaults <% result = {} services(tag:"webscale").each do |srv, tags| result[srv] = {'passing' => 0, 'warning' => 0, 'critical' => 0} service(srv).each do |snode| result[srv][snode.status] += 1 end end %><%= YAML.dump(result) %>
  • 10. A nice API with sensitive defaults <% result = {} services(tag:"webscale").each do |srv, tags| result[srv] = {'passing' => 0, 'warning' => 0, 'critical' => 0} service(srv).each do |snode| result[srv][snode.status] += 1 end end %><%= YAML.dump(result) %> --- chef-server: passing: 11 warning: 0 critical: 0 chef-webscale: passing: 3 warning: 0 critical: 0 chef-webscale-backend: passing: 1 warning: 0 critical: 0 host-arbitrage: passing: 388 warning: 0 critical: 2 host-arbitrage-admin: passing: 388 warning: 0 […]
  • 11. A nice API with sensitive defaults <% result = {} services(tag:"webscale").each do |srv, tags| result[srv] = {'passing' => 0, 'warning' => 0, 'critical' => 0} datacenters.each do |dc| service(srv, dc:dc).each do |snode| result[srv][snode.status] += 1 end end end %><%= YAML.dump(result) %>
  • 12. A nice API with sensitive defaults <% result = {} services(tag:"webscale").each do |srv, tags| result[srv] = {'passing' => 0, 'warning' => 0, 'critical' => 0} datacenters.each do |dc| service(srv, dc:dc).each do |snode| result[srv][snode.status] += 1 end end end %><%= YAML.dump(result) %> --- chef-server: passing: 25 warning: 0 critical: 0 chef-webscale: passing: 3 warning: 0 critical: 0 chef-webscale-backend: passing: 1 warning: 0 critical: 0 host-arbitrage: passing: 4493 warning: 0 critical: 23 host-arbitrage-admin: passing: 4493 warning: 0 […]
  • 13. Demo Time! • Using ruby gems gem install consul-templaterb consul-templaterb --help • Using docker for the GUI: https://hub.docker.com/r/discoverycriteo/consul-templaterb
  • 14. History of Services in a large Consul Cluster
  • 15. Highly scalable UI (1000s of users)
  • 16. See how we are using it to build new Stuff Tomorrow at Sep 11 | 3:20 PM - 3:55 PM at Elwha A | Level 5 Inversion Of Control with Consul https://hashiconf.hashicorp.com/schedule/inversion-of-control-with-consul Slides: https://www.slideshare.net/PierreSouchay/2019-hashiconf-seattleconsulioc Other resources: https://www.hashicorp.com/resources/operating-consul-at-scale https://www.hashicorp.com/resources/criteo-containers-consul-connect