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
250
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
320
Other Decks in Programming
See All in Programming
法律の脱レガシーに学ぶフロントエンド刷新
oguemon
2
130
Compose でデザインと実装の差異を減らすための取り組み
oidy
1
230
ErdMap: Thinking about a map for Rails applications
makicamel
1
990
ATDDで素早く安定した デリバリを実現しよう!
tonnsama
1
2.3k
ASP. NET CoreにおけるWebAPIの最新情報
tomokusaba
0
190
Scaling your build logic
antalmonori
1
130
PHPとAPI Platformで作る本格的なWeb APIアプリケーション(入門編) / phpcon 2024 Intro to API Platform
ttskch
0
410
SpringBoot3.4の構造化ログ #kanjava
irof
2
580
振り返れば奴(Cline)がいる
keiyagi
0
110
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
800
2,500万ユーザーを支えるSREチームの6年間のスクラムのカイゼン
honmarkhunt
6
3.7k
テストコード書いてみませんか?
onopon
2
360
Featured
See All Featured
The Language of Interfaces
destraynor
156
24k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.2k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.4k
Measuring & Analyzing Core Web Vitals
bluesmoon
5
220
The Cult of Friendly URLs
andyhume
78
6.2k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
260
Producing Creativity
orderedlist
PRO
343
39k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
GraphQLとの向き合い方2022年版
quramy
44
13k
Building Adaptive Systems
keathley
39
2.4k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.7k
Why Our Code Smells
bkeepers
PRO
335
57k
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