Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Mesos + Consul = Developer Happiness
Search
Brian Hicks
July 09, 2015
Programming
3
920
Mesos + Consul = Developer Happiness
Talk given to the Denver Mesos Usergroup on July 9th, 2015
Brian Hicks
July 09, 2015
Tweet
Share
More Decks by Brian Hicks
See All by Brian Hicks
Esperanto
brianhicks
0
120
Snake Snacks: Function Composition, The Dumb Way
brianhicks
0
96
Make Snacks: Yet Another JavaScript Build System
brianhicks
0
68
State of Elm 2017
brianhicks
1
480
µKanren: A Minimal Functional Core for Relational Programming
brianhicks
0
390
Terraform All The Things!
brianhicks
2
340
Kubernetes for the Mesos User
brianhicks
1
92
ch-ch-ch-ch-changes in Elm 0.17.0
brianhicks
2
1.8k
State of Elm 2016
brianhicks
3
490
Other Decks in Programming
See All in Programming
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
1k
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
240
現場で役立つモデリング 超入門
masuda220
PRO
15
3.1k
Jakarta Concurrencyによる並行処理プログラミングの始め方 (JJUG CCC 2024 Fall)
tnagao7
1
280
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
4
790
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
5
1.6k
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
200
イベント駆動で成長して委員会
happymana
1
300
JavaでLチカしたい! / JJUG CCC 2024 Fall LT
nhayato
0
120
macOS でできる リアルタイム動画像処理
biacco42
9
2.3k
Identifying User Idenity
moro
6
9.7k
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
Featured
See All Featured
Practical Orchestrator
shlominoach
186
10k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Writing Fast Ruby
sferik
627
61k
Scaling GitHub
holman
458
140k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Optimizing for Happiness
mojombo
376
70k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Facilitating Awesome Meetings
lara
50
6.1k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
How to Ace a Technical Interview
jacobian
276
23k
GraphQLとの向き合い方2022年版
quramy
43
13k
Transcript
Mesos+Consul= Developer Happiness
Brian Hicks @brianhicks
None
None
OXY HAPROXY client SERVER
marathon-consul haproxy-Consul
Service discovery and configuration made easy. Distributed, highly available, and
datacenter-aware. consul.io
(and DNS) SERVICES
[{ "Address": "10.0.113.214", "Node": "batman-control-01", "ServiceAddress": "", "ServiceID": "marathon", "ServiceName":
"marathon", "ServicePort": 18080, "ServiceTags": ["marathon"] }] curl localhost:8500/v1/catalog/service/marathon Query a Service over HTTP
216.58.216.206 dig +short www.google.com DNS
10.0.113.214 10.0.220.54 10.0.131.25 1 1 18080 batman-control-02.node.batman.consul. 1 1 18080
batman-control-03.node.batman.consul. 1 1 18080 batman-control-01.node.batman.consul. dig +short marathon.service.consul dig +short marathon.service.consul SRV SRV Records
{ "name": "marathon", "tags": [ "marathon", "dc-denver" ], "port": 18080,
"check": { "script": "curl http://127.0.0.1:18080/ping", "interval": "10s" } } Service Definition
{ "name": "marathon", "tags": [ "marathon", "dc-denver" ], "port": 18080,
"check": { "script": "curl http://127.0.0.1:18080/ping", "interval": "10s" } } Service Definition
{ "name": "marathon", "tags": [ "marathon", "dc-denver" ], "port": 18080,
"check": { "script": "curl http://127.0.0.1:18080/ping", "interval": "10s" } } Service Definition
{ "name": "marathon", "tags": [ "marathon", "dc-denver" ], "port": 18080,
"check": { "script": "curl http://127.0.0.1:18080/ping", "interval": "10s" } } Service Definition
curl http://localhost:8500/v1/agent/service/register \ -d @marathon.json REgistering the Service
& Q A
and Values) (and Values) Keys
true [{ "CreateIndex": 223, "Flags": 0, "Key": "hello", "LockIndex": 0,
"ModifyIndex": 223, "Value": "d29ybGQ=" }] curl -X PUT -d world http://localhost:8500/v1/kv/hello curl -X GET http://localhost:8500/v1/kv/hello Setting and Retrieving
true false curl -X PUT -d denver http://localhost:8500/v1/kv/hello?cas=223 curl -X
PUT -d world http://localhost:8500/v1/kv/hello?cas=1 Check and Set
WAtches HTTP/1.1 200 OK Content-Type: application/json X-Consul-Index: 226 X-Consul-Knownleader: true
X-Consul-Lastcontact: 0 Date: Mon, 29 Jun 2015 16:25:45 GMT Content-Length: 96 curl http://localhost:8500/v1/kv/hello?index=226
consul-template This project provides a convenient way to populate values
from Consul into the filesystem using the consul-template daemon. github.com/hashicorp/consul-template
Haproxy Template global maxconn {{or (key "service/haproxy/maxconn") 256}} debug defaults
mode http timeout connect {{or (key "service/haproxy/timeouts/connect") "5000ms"}} timeout client {{or (key "service/haproxy/timeouts/client") "50000ms"}} timeout server {{or (key "service/haproxy/timeouts/server") "50000ms"}} {{range services}} frontend {{.Name}} bind *:{{key (printf "ports/%s" .Name)}} {{range service .Name}} server {{.Node}} {{.Address}}:{{.Port}}{{end}} {{end}}
Haproxy Template global maxconn {{or (key "service/haproxy/maxconn") 256}} debug defaults
mode http timeout connect {{or (key "service/haproxy/timeouts/connect") "5000ms"}} timeout client {{or (key "service/haproxy/timeouts/client") "50000ms"}} timeout server {{or (key "service/haproxy/timeouts/server") "50000ms"}} {{range services}} frontend {{.Name}} bind *:{{key (printf "ports/%s" .Name)}} {{range service .Name}} server {{.Node}} {{.Address}}:{{.Port}}{{end}} {{end}}
Haproxy Template global maxconn {{or (key "service/haproxy/maxconn") 256}} debug defaults
mode http timeout connect {{or (key "service/haproxy/timeouts/connect") "5000ms"}} timeout client {{or (key "service/haproxy/timeouts/client") "50000ms"}} timeout server {{or (key "service/haproxy/timeouts/server") "50000ms"}} {{range services}} frontend {{.Name}} bind *:{{key (printf "ports/%s" .Name)}} {{range service .Name}} server {{.Node}} {{.Address}}:{{.Port}}{{end}} {{end}}
Haproxy Template global maxconn {{or (key "service/haproxy/maxconn") 256}} debug defaults
mode http timeout connect {{or (key "service/haproxy/timeouts/connect") "5000ms"}} timeout client {{or (key "service/haproxy/timeouts/client") "50000ms"}} timeout server {{or (key "service/haproxy/timeouts/server") "50000ms"}} {{range services}} frontend {{.Name}} bind *:{{key (printf "ports/%s" .Name)}} {{range service .Name}} server {{.Node}} {{.Address}}:{{.Port}}{{end}} {{end}}
global maxconn {{or (key "service/haproxy/maxconn") 256}} debug defaults mode http
timeout connect {{or (key "service/haproxy/timeouts/connect") "5000ms"}} timeout client {{or (key "service/haproxy/timeouts/client") "50000ms"}} timeout server {{or (key "service/haproxy/timeouts/server") "50000ms"}} {{range services}} frontend {{.Name}} bind *:{{key (printf "ports/%s" .Name)}} {{range service .Name}} server {{.Node}} {{.Address}}:{{.Port}}{{end}} {{end}} Haproxy Template
global maxconn {{or (key "service/haproxy/maxconn") 256}} debug defaults mode http
timeout connect {{or (key "service/haproxy/timeouts/connect") "5000ms"}} timeout client {{or (key "service/haproxy/timeouts/client") "50000ms"}} timeout server {{or (key "service/haproxy/timeouts/server") "50000ms"}} {{range services}} frontend {{.Name}} bind *:{{key (printf "ports/%s" .Name)}} {{range service .Name}} server {{.Node}} {{.Address}}:{{.Port}}{{end}} {{end}} Haproxy Template
& Q A
(yes, we're getting a new name) microservices-infrastructure Github.com/CiscoCloud/microservices-infrastructure Microservices infrastructure
is a modern platform for rapidly deploying globally distributed services
Components
@brianhicks //
[email protected]
@ASteris_LLC //
[email protected]
Colophon Eggs. Plenty of them. Alex Barth, Licensed CC BY
2.0 https://www.flickr.com/photos/a-barth/4985481182 Dictionary Greeblie, Licensed CC BY 2.0 https://www.flickr.com/photos/greeblie/3338710223