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
自作ロードバランサ開発 / JANOG40 SP6LB
Search
yunazuno
July 28, 2017
Technology
0
160
自作ロードバランサ開発 / JANOG40 SP6LB
JANOG40 ショートプログラム 「自作ロードバランサ開発」
https://www.janog.gr.jp/meeting/janog40/program/sp6lb
yunazuno
July 28, 2017
Tweet
Share
More Decks by yunazuno
See All by yunazuno
eXpress Data Path (XDP) の概要とLINEにおける利活用 / Brief summary of XDP and use-case at LINE
yunazuno
10
2.8k
Norikraを非リアルタイムなデータ集計に使う試み
yunazuno
1
6.6k
Other Decks in Technology
See All in Technology
あなたの知らないクラフトビールの世界
miura55
0
120
My small contributions - Fujiwara Tech Conference 2025
ijin
0
1.4k
dbtを中心にして組織のアジリティとガバナンスのトレードオンを考えてみた
gappy50
0
240
デジタルアイデンティティ人材育成推進ワーキンググループ 翻訳サブワーキンググループ 活動報告 / 20250114-OIDF-J-EduWG-TranslationSWG
oidfj
0
530
#TRG24 / David Cuartielles / Post Open Source
tarugoconf
0
580
2025年のARグラスの潮流
kotauchisunsun
0
790
JAWS-UG20250116_iOSアプリエンジニアがAWSreInventに行ってきた(真面目編)
totokit4
0
140
DMMブックスへのTipKit導入
ttyi2
1
110
Unsafe.BitCast のすゝめ。
nenonaninu
0
200
Docker Desktop で Docker を始めよう
zembutsu
PRO
0
160
PaaSの歴史と、 アプリケーションプラットフォームのこれから
jacopen
7
1.5k
Bring Your Own Container: When Containers Turn the Key to EDR Bypass/byoc-avtokyo2024
tkmru
0
850
Featured
See All Featured
Fireside Chat
paigeccino
34
3.1k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Testing 201, or: Great Expectations
jmmastey
41
7.2k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.2k
Why Our Code Smells
bkeepers
PRO
335
57k
Embracing the Ebb and Flow
colly
84
4.5k
Optimizing for Happiness
mojombo
376
70k
Making Projects Easy
brettharned
116
6k
A better future with KSS
kneath
238
17k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.3k
Transcript
ࣗ࡞ϩʔυόϥϯα։ൃ :PIFJ ,BOFNBSV -*/&$PSQPSBUJPO ZPIFJLBOFNBSV BUMJOFDPSQDPN !ZVOB[VOP
͜ΜͳιϑτΣΞ-#Λ։ൃ͍ͯ͠·͢ • -*/&ͷαʔϏεʹඞཁͳػೳΛඋ͍͑ͯΔ • ී௨ͷY-JOVYαʔό্Ͱಈ࡞͢Δ • ߴ͍εέʔϥϏϦςΟ͕͋Δ 2017-07-28 JANOG 40
Meeting 2 ৄ͍͠എܠ +"/0(ൃදࢿྉ ొஃϨϙʔτʹͯ [1] LINE (JANOG39 ) https://www.janog.gr.jp/meeting/janog39/program/line.html [2] JANOG39 LINE https://engineering.linecorp.com/ja/blog/detail/135
ϩʔυόϥϯαͷΞʔΩςΫνϟ͍Ζ͍Ζ $FOUSBMJ[FE-PBE#BMBODFST .JDSPTPGU"OBOUB 'BDFCPPLTIJW (PPHMF.BHMFW %FDFOUSBMJ[FE-PBE#BMBODFST ($1*OUFSOBM-#
$MPVEGMBSF 1P1T 2017-07-28 JANOG 40 Meeting Ωʔϫʔυ/ .VMUJ5JFS MS Ananta FB shiv Google Maglev [1] Microsoft Ananta https://doi.org/10.1145/2534169.2486026 [2] Facebook Shiv: https://www.usenix.org/conference/srecon15/program/presentation/shuff [3] Google Maglev https://research.google.com/pubs/pub44824.html 3
ߏ͔Β / .VMUJUJFSߏ 2017-07-28 JANOG 40 Meeting
4 / .VMUJUJFS Client L4 LB APP : In service : Not in service L4 LB APP L7 LB L3 Switch Client L3DSR TCP/HTTP(S) termination L3DSR ECMP ࠓճ͝հ͢Δͷ ͜ͷ෦
ஈ #(1 &$.1 1FSGMPX&$.1ʹΑΓɺ--#͓͓ΑͦۉʹτϥϑΟοΫΛࢄ 2017-07-28 JANOG 40 Meeting 5
Equal Cost Multi Path (ECMP) VIP: 192.0.2.1/32 L4LB-1 Hash(5-tuple) -> L4LB-[1-3] L3 Switch VIP: 192.0.2.1/32 L4LB-2 VIP: 192.0.2.1/32 L4LB-3 eBGP peer Flow X Flow Y
ஈ 4UBUFMFTT --# $POTJTUFOU)BTIͰࢄઌ--#Λܾఆ͠ɺ-%43Ͱύέοτసૹ 2017-07-28 JANOG 40 Meeting 6
L3 Switch L4LB-1 L7LB-1 L7LB-2 L4LB-2 L7LB-3 L7LB-4 ConsistentHash(Hash(5-tuple)) -> L7LB-[1-4] Flow X Flow Y
--# F9QSFTT %BUB 1BUI 9%1 Λ׆༻ -JOVYLFSOFMͰಈ࡞͢ΔɺF#1'Λ༻͍ͨߴύέοτॲཧج൫ 2017-07-28 JANOG
40 Meeting eBPF Map VIP-Backend table Statistics table C eBPF C code (Data Plane) Clang/LLVM eBPF Bytecode Python Management Plane eBPF JIT eBPF VM API VIP->Backend lookup Statistics Kernel User eBPF Verifier 7 BGP daemon XDP Program From L3 Switch To L7LB Kernel NIC Advertise VIP Compiler -PPLVQ7*1 )BTI UVQMF .PEJGZ*1IFBEFS Maintain map
--# ϊʔυ୯ମύϑΥʔϚϯε 2017-07-28 JANOG 40 Meeting 8 )BSEXBSFY*OUFM9FPO&W DPSFT
(%%3.FMMBOPY$POOFDU9-Y&/(C& 4PGUXBSF-JOVY,FSOFMSD EDCG #1'+*5FOBCMFE &OWJSPONFOU 19.1 15.0 10.8 5.8 2.9 2.0 0% 20% 40% 60% 80% 100% 0 4 8 12 16 20 64 128 256 512 1024 1518 Link Utilization [%] Throughput [Mpps] Frame size [byte] Throughput [Mpps] Link Utilization (/25GbE) [%] 25GbE wire-rate
࣮ࡍͷͱ͜ΖͲΜͳঢ়گ ॳͷૂ͍͓͓ΉͶୡͰ͖ͦ͏ खݩͷίʔυͱಉҰͷͷ͕࣮ωοτϫʔΫͰͦͷ··ಈ࡞͢Δ ςετ͕͍͢͠ɾಈ࡞͕ݟ͍͑͢ / ߏ͕ʹͳΔέʔε͋Δ .VMUJQBUI5$1 *1'SBHNFOU Ұ෦ͷಛघҊ݅
2017-07-28 JANOG 40 Meeting 9
ࠓޙͷల ຊ֨తʹϓϩμΫγϣϯڥͷೖΛ։࢝ ػೳՃߏͷΞοϓσʔτ %P4 %%P4ޚ εςʔτϑϧηογϣϯΩϟογϡ -36DBDIF ͷซ༻ #(1VOOVNCFSFE 3'$
%$OFUXPSLͷ-Խ ϋʔυΣΞدΓͷΞϓϩʔνΛௐࠪɾݕ౼ 9%1 F#1' IBSEXBSFPGGMPBE 1SPHSBNNBCMF"4*$ 1 2017-07-28 JANOG 40 Meeting 10