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
HTTP routing with Linkerd
Search
Borys Pierov
December 08, 2017
Programming
0
240
HTTP routing with Linkerd
A practical example of routing HTTP traffic with Linkerd
Borys Pierov
December 08, 2017
Tweet
Share
More Decks by Borys Pierov
See All by Borys Pierov
Modeling Trees: Graphs vs SQL-based MPTT
ashald
0
290
Other Decks in Programming
See All in Programming
AppDeveloperCon 2024 EU: Building polyglot developer experiences in 2024
salaboy
0
380
SwiftUI, Jetpack Composeの導入で変化した「家族アルバム みてね」のアプリ開発体験
hicka04
6
400
DDDはなぜ難しいのか / 良いコードの定義と設計能力の壁
pospome
25
7.7k
自動テスト実行結果の目的を整理する / Organizing objectives of automated test results
twada
PRO
10
2.1k
incrementalモデルの理解を深める
ikkimiyazaki
2
640
Dockerで始めるAWS Lambda開発
stutkhd0709
14
2.5k
上手な探索的テストとその上達方法について
matsu802
4
660
脱・初心者!脱・マネコン!AWS CDKを使ってみませんか!?
har1101
0
180
受託開発でGitLab CI を活用していく
xiombatsg
1
130
プロンプトエンジニアリング入門
tomokusaba
2
990
WasmOS: Wasmを実行する自作Microkernel
riru
0
380
Kotlinを用いたDSL的な設計手法と使用上の注意
kohii00
3
540
Featured
See All Featured
Design by the Numbers
sachag
274
18k
Clear Off the Table
cherdarchuk
82
310k
Art, The Web, and Tiny UX
lynnandtonic
288
19k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
225
51k
What's in a price? How to price your products and services
michaelherold
236
11k
Faster Mobile Websites
deanohume
296
30k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
319
20k
JazzCon 2018 Closing Keynote - Leadership for the Reluctant Leader
reverentgeek
178
11k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
8
8.2k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
28
5.9k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
1
3.3k
Stop Working from a Prison Cell
hatefulcrawdad
265
19k
Transcript
$ echo ‘HTTP routing with Linkerd’
$ echo $(whoami)@$(domainname)
[email protected]
$ man ncbi NAME NCBI – National Center for Biotechnology
Information DESCRIPTION World’s go-to place for biomedical and genomic info HISTORY Building software since 1988 ENVIRONMENT Hybrid on-premises & multi-cloud Over 3K services Serving 7K RPS EXAMPLES PubMed, GenBank, PMC, BLAST
$ http_proxy=linkerd:4140 curl http://foo.l5d.ncbi.nlm.nih.gov
service │ works w/ │ containers & w/o │ │
│ ┌───┴────┐ ┌┴┐ $ http_proxy=linkerd:4140 curl http://foo.l5d.ncbi.nlm.nih.gov └──┬──┘ └────────┬─────────┘ │ │ /etc/hosts │ │ │ │ convention
$ curl –H “Host: foo.l5d.ncbi.nlm.nih.gov” http://linkerd:4140
service │ │ ┌┴┐ $ curl –H “Host: foo.l5d.ncbi.nlm.nih.gov” http://linkerd:4140
└────────┬─────────┘ └──┬──┘ │ │ │ │ long domain names phobia │ /etc/hosts
<Location "/foo"> RequestHeader set Host foo.l5d.ncbi.nlm.nih.gov ProxyPass http://linkerd:4140 </Location>
routers: - protocol: http dstPrefix: /http identifier: - kind: io.l5d.header.token
header: Host interpreter: ... servers: - port: 4140
GET /login HTTP/1.1 Host: foo.l5d.ncbi.nlm.nih.gov
/http/foo.l5d.ncbi.nlm.nih.gov
/http => /#/rinet/80 /http => /$/domainToPath /gov/nih/nlm/ncbi/l5d => /service /service
=> /#/consul/.local /service/foo => /service/foo-1 /service/bar => /service/bar-1 /service/baz => /service/baz-1
None
None
None
None
foo bar baz
foo l5d bar l5d baz
foo-1 l5d bar-1 l5d baz-1 foo-2 bar-2 baz-2
foo-1 l5d bar-1 l5d baz-1 foo-2 bar-2 baz-2 CTX CTX
CTX CTX
$ curl –H “Host: foo.l5d.ncbi.nlm.nih.gov” http://linkerd:4140 \ > -H “l5d-dtab:
/service/baz=>/versioned/baz-2”
foo-1 l5d bar-1 l5d baz-1 foo-2 bar-2 baz-2 CTX CTX
CTX