- 快召唤伙伴们来围观吧
- 微博 QQ QQ空间 贴吧
- 文档嵌入链接
- 复制
- 微信扫一扫分享
- 已成功复制到剪贴板
郭平(坤宇)-12.8--阿里巴巴大规模分布式软负载体系原理及实践
阿里巴巴大规模分布式软负载体系原理及实践
演讲大纲:
- 什么是软负载?
- 阿里巴巴9年双11的软负载实践
- 软负载技术架构原理
- 微服务应用架构趋势与软负载
- 阿里巴巴开源中间层软负载均衡产品NACOS
展开查看详情
1 .ᴨ᯾૬૬य़ᥢཛྷړୗᨮ ֛ᔮܻቘ݊ਫ᪢ ࣡ਜ ᴨ᯾૬૬ṛᕆದӫਹ
2 .࣡ਜ ṛᕆದӫਹ • ᴨ᯾૬૬Ӿᳵկࢫᴚᨮ̵ᯈᗝӾஞզ݊ iPaaSԾߝᕚᨮᨱՈ • ᴨ᯾ԯᯈᗝԾߝ ACM ԾߝᎸݎLeader • Nacos რԾߝڠতՈ • OpenConfiguration ᥢݎ᩸Ո
3 .• Ջԍฎᨮ • ᴨ᯾૬૬9ଙ11Ӿጱᨮਫ᪢ • ᨮದຝܻቘ • ங๐ۓଫአຝ۠Өᨮ • ᴨ᯾૬૬რӾᳵ੶ᨮ࣐ᤍԾߝ Nacos
4 . Ջԍฎ “Ꮭᨮ”Ҙ Organiza(on’s,DMZ ᴠᅉा DMZ ࢥ੶ կ • 4੶Ꮭկᨮ࣐ᤍ • f5/lvs,᪠ኧ,ᗑᕶNAT Ӡ੶ Ꮭկ • 7੶ݻݍդቘᵞᗭ • nginx/apache/haproxy • ۖᶉړᐶ • ړၞ᪠ኧ Ꮭᨮ ฎփᕹጱմӱᕆದຝӾࣁ ၞᰁഴ׆ګ؇᯿ԭֵአᏝկᨮ࣐ᤍ̵؇ ٖ᮱ᗑىᨮ࣐ᤍ ᯿ԭࢥ੶ᨮ࣐ᤍ̵؇᯿ԭᵞӾጱᗑىդቘ • F5 ཛྷୗ҅؇᯿ԭServer-Based Load Balanceጱ • LVS Ӟᔮڜጱਫ᪢ොဩ̶
5 . “Ꮭᨮ”ᶎԁጱԾӱ۠ • ؇4੶ᨮ࣐ᤍ • ၞᰁጱӧᏟਧ҅ᵱᥝ୨ᅎၚ ᘶᗑ • IDCٖ᮱ጱԏᳵጱၞᰁԞஉय़ • ဳىᨮ࣐ᤍጱۑᚆጱݢಘ • ᗑܔىᅩᵙզၾᴻ҅ඳᵑ௩॔ౌ ԯᦇᓒ • ၞᰁጱᔜᕡഴ੶ࢥ҅ګᨮ࣐ᤍᵙզቘᥴӱۓԎ • ᶳဳى౮ DevOps • ဳىෆӻᨮ֛ᔮጱݢᬩᖌ,ݢ֢,ݢᓕቘ
6 . ᨮ • ؇᯿ԭ7੶ᨮ࣐ᤍ • կਧԎၞᰁ࣐ᤍᒽኼ • ቘᥴӱۓԎጱၞᰁ᧣ • හഝᓒဩḝۖጱᔜᕡၞᰁഴګᒽኼ • ಘᅎၚ • ݢ֢
7 . ӡᇔጲ“๐”ۓ զ๐ۓԅӾஞጱሿդଫአຝ۠ service Service-Centric Architecture
8 . ங๐ۓጱचᎪ - ๐ݎۓሿӨဳٙӾஞ Server • ս۠ • ۠ە • ֺৼ Client • ս۠ • ۠ە • ֺৼ • فੜ • ᗑىୗ҅ํܔᅩ • ෫ܔᅩ • فय़ Based • Nginx • DNS • ฃᵞӾᓕഴ • ౮ṛ • LVS • Maglev Based • ᵋଫአᛔᆐᖽ • ౮֗ • ᵙᵞӾᓕഴ • Ribbon & Eureka • Service Mesh च च ԭ ԭ ਮ ๐ ಁ ۓ ᒒ ᒒ ᒒ ᨮ ᨮ ࣐ ࣐ ᤍ ᤍ ࢶᇆᛔ microservices.io
9 . ᴨ᯾૬૬9ଙ11Ӿጱᨮਫ᪢ • ᕹӞളف • ᕚӤۖாᵍᐶሾह • ஙᅍଶ • زܔ۸݊ࣈग़ၚ • ၞᰁ᧣ଶ
10 . ᕹӞളف PC ᕹӞളف • ۖᶉړᐶ • httpsے᭛&ᦤԡᓕቘ ᕹӞളف ᨻᇔ ࠟߝ Իฃ ඪ՞ • ݗفၞᰁጱᴴၞ (Tengine) ෫ᕚ • ἓᅍၞᰁႴ။҅ਞق ᴠධڋ • ฬᚆၞᰁݎᒽኼҁአ IoT ಁᇙ၏҂ ᕹӞളف ᨻᇔ ࠟߝ Իฃ ඪ՞ (Tengine) • ᭦ᬋړၞӨᅒ Ӿᳵ੶ᨮ࣐ᤍ • ඪ೮᱾᪠᭄᪵ IAAS
11 . ۖாᵍᐶሾह ၥᦶሾहҁTest҂ ፥ਫኞԾሾह ܴၥၞᰁ ፥ਫኞԾၞᰁ ᕹӞള੶ف ᶼኞԾሾहҁStage҂ • ۖாሾहvsᶉாሾह • ໑ഝᵱۖாኞ౮ӻሾह • ౮֗ ኞԾሾहҁProduction҂ • ᭦ᬋᵍᐶ vs ᇔቘᵍᐶ • ᭦ᬋᵍᐶๅᅎၚ • ᒧݳ୨ᒵᵱ ኞԾ๐ړۓᕟ ᕚӤܴၥ๐ړۓᕟ Ӿᳵ੶ᨮ࣐ᤍ(Mid-Tier ඪ೮ۖா̵᭦ᬋᵍᐶ LoadBalancer)
12 . ஙᅍଶ • ᅍଶපሲᳯ᷌ • භഠڠෛᦶᲙ • ොဩ A/B Testing • ݸᒒၥᦶᵙ • ֗౮ಘग़ॺሾह • ᱾᪠ວᜋ • Ӥӥׁᩢ᱾᪠॔ ҅ • ӱۓ0فጱᅍଶ • ᯿᪠ኧၞᰁഴګ ෛၥᦶሾह᮱ᗟࢯᵙ ၥᦶሾहಋྦྷ • ᱾᪠٫ᑱ༄ၥ • ᕚӤහഝ᱾᪠ᇫா • ᕚӤ፥ਫၞᰁ • ᩒრܛአਭ໐ ᵙզճ፥ • ᰁᓕቘ • ᱾᪠ੴ᮱ڠෛս۸ ᵙ create ஙᅍଶ1 ᥢڞ - 3% ၞᰁ -’label-1’ create ஙᅍଶ1 ᥢڞ -10% ၞᰁ -’label-2’
13 . زܔ۸݊ࣈग़ၚ ᕹӞള੶ف ܄ऒ زܔA ᕹӞള & فӾᳵ੶ᨮ࣐ᤍ Ӿᳵ੶ᨮ࣐ᤍ • ᦩڦአಁᇙ • ᦩڦၞᰁ܄ऒᇙ ܄ऒ زܔB CDN • ᦩڦIDCړಏᕮ Ӿᳵ੶ᨮ࣐ᤍ • ඪ೮ၞᰁ᯿ഴګ ܄ऒ زܔC • ᦩڔڦၞ&ᅒᥢڞ Ӿᳵ੶ᨮ࣐ᤍ
14 .ၞᰁ᧣ଶ • Metrics හഝතᵞ • ໑ഝᵱۖாኞ౮ӻሾह • ౮֗ • ଧහഝਂؙ • ଧᑮහഝପ • හഝړຉ&ᓒဩ • ଧᑮහഝପ • قੴᛔۖ٬ᒽ • ᴳ᯿ • ਧᅩഴګᬢᑏ • ӥᕚ • ᴇ꧊כಷ҅ᴠᵪૄ चԭහഝᓒဩḝۖጱᛔۖ ٬ᒽ҅ᔜᕡጱၞᰁ᧣ଶ
15 . ෆ֛ຝܻቘ • ᔮᕹ᭗ ӱۓၞᰁ • Ӿᳵ੶ᨮ࣐ᤍӨCMD • Ӿᳵ੶ᨮ࣐ᤍӨAPI Gateway ᔜᕡၞᰁᥢ੶ڞ Ӿᳵ੶ᨮ࣐ᤍ • ᯈᗝӾஞӨၞᰁᥢڞ • चᏐӾᳵկӨӾᳵ੶ᨮ࣐ᤍ • Ӿᳵ੶ᨮ࣐ᤍӨӱۓଫአ ᕹӞളف ஙᅍଶ ሾहᵍᐶ زܔ۸ DPath ဳٙӾஞ m • ቘᥴӱۓၞᰁ e • cookie҅path҅param DNS-SD t قੴၞᰁ᧣ଶ • header Ӿᳵկ੶ r • ಄ಏ ҁහഝḝۖ҂ i RPC ၾ௳ ړୗᖨਂ ړୗහഝପ ᯈᗝӾஞ • قmetrics c • ᗑᕶ֢҅ᔮᕹ҅tomcat҅ᖨ s ਂ҅RPC҅ӱۓ᮷ᥝูᶂݳᭇጱ ړୗ᧣ܐ ᇫாහഝ DNS(bind) Tengine LVS • ୩य़ጱӾᳵ੶ᨮ࣐ᤍ • य़ᥢཛྷහഝݎړവᭆᚆێ ᇙྛᏝկے᭛ CMDB ਂᦇ&ؙᓒଘݣ • හഝḝۖ • හഝӾஞᇫாහഝ ᩒრ᧣ଶ • ਫכᵑ • य़හഝҁᦇᓒଘݣ҂ • Ոૡ+ฬᚆጱ٬ᒽ IAAS (ᗑᕶ҅Ԇ֢҅ᔮᕹ҂ • ӧෙදᬰᓒဩ • ԟොဩ
16 . “๐ݎۓሿ”vs“ᨮ”(weight) Registry Registry ๐ݎۓሿ ၞᰁഴګ tell me tell me svc1’s endpoints! register svc1’s register endpoints! Consume Provide Provide Consume ip1,ip2,i p3 {ip1} request flow request flow ip1:port1/ ip1:port1/ svc1 svc1 ip2:port2/ ip2:port2/ Consume ip1,ip2,ip3 svc1 Consume svc1 {ip1,ip2,ip3} ip3:port2/ ip3:port2/ svc1 svc1
17 . ๐ݎۓሿ vs ᨮ (label match&selector) Registry Registry ๐ݎۓሿ ۖா୭ᕟ tell me tell me svc1’s svc1’s endpoints! register endpoints! register Provide Consume Provide Consume ip1,ip2,i {ip1,ip2} p3 request flow request flow ip1:port1/ ip1:port1/ svc1 svc1 ip2:port2/ ip2:port2/ svc1 Consume svc1 Consume {ip3} ip1,ip2,ip3 ip3:port2/ ip3:port2/ svc1
18 .ᨮጱचᎪ - Label Based & Weight label based weight (metadata) (0.1ᔜଶ)
19 .“ᨮ”Өෛದ۠ • Service Mesh • ฎclient base LB ᬮฎ server baseҘ • service meshԅ֜ᥝඪ೮᯿᪠ ኧҘ • Traffic Management ጱᨶฎՋ ԍ? • Kubernetes DNS-SD • ՋԍฎDNS-SDҘ • Label selector Service Mesh य़ᥢཛྷኞԾଫ አԏ “ᴨ࠶ේԏ᪺“ - 1. ᚆኒ᷀ - 2. ၞᰁလቘጱಘӨᚆጱ ଘᤍ ํᥴ٬ԏ᭲҅֕Ӟ੶ᶳݒ ᶐ…
20 . ᴨ᯾૬૬᭑ྍਖ਼“ᨮ֛ᔮ”რන” ာኪ֛ࠟᔮ य़ৈ ᔱ&ଠޞ ࢵᴬ۸ ҁॠሞ̵Ⴃਪ̵ោề̵و ҁսᯡ̵ᴨ᯾ӱ̵ ҁᔱ̵ᴨ᯾ঌ ṛࣈࢶ ҁLazada,AliEx ᴨ᯾ԯ ਞق Ձӱۓଘ̵ݣᘸښᓒ̵ፋ ঌ…҂ ᴨ᯾ᶪԔ…) press҂ Ḙ …) ᨮ࣐ य़හഝᦇ ࣈग़ၚ ๐ۓလቘ ๐ۓᖫഭ ၞᰁ᧣ଶ ሾहᵍᐶ ୨ᦇᓒ ڔପᅒ ᶼໜᴴၞ ձ᧣ۓଶ ᤍ ᓒ OPS Service Health Dynamic Intelligent Traffic Mgr Config Push Meta KV Distributed Discovery Check DNS Route Service Service Coordinator user ᴨ᯾૬૬რ portal ConfigServer VIPServer Diamond TaoKeeper ړୗӞᛘ(ZAB,Piv-Raft,Gossip,SW,Async- Log Nacos Notify,Timer-DUMP) Name Nginx/ Server LVS &Stre am admin portal MySQL Derby Disk File CMDB GNS ETCD REGI REGION REGION IDC IDC IDC IDC IDC IDC https://github.com/alibaba/nacos
21 . Nacos - ඪ೮Metadata WeightጱဳٙӾஞ Nacos 1.0 Service Infra Dubbo 4.0 + Nacos 2.0 - An Open ๐ဳۓٙӨݎሿ Service Platform ๐زۓහഝᓕቘ ๐ۓᬳളӨ᧣አ ๐ۓᯈᗝᓕቘ ๐ۓ؋଼ᓕቘ ๐ۓኞޮ๗ᓕቘ ๐ۓᴴၞӨᆤෙ ๐ۓಏׁᩢړຉ ሾहᵍᐶ Service Traffic ඳᵑᵍᐶ Managem service Management ฬᚆ᪠ኧ Kubernetes Dubbo ჻ۖ܋ᕆ ᨮ࣐ᤍ ኞா ኞா Service-Centric Architecture ๐ۓ୨ ၞᰁ᧣ଶ Nacos ๐ۓSLAᓕቘ Service սᵝӤӥᕚ ๐ۓਞقᒽኼ Integration&Mark ࣈग़ၚ eting Spring ኞா ๐وۓՁ ๐ᦓܐۓഘ ๐ۓፓ୯ᓕቘ ๐ۓᘸᵞӨᵞ౮ ๐ۓऒလቘ ๐ᦧۓհᔮᕹᓕቘ ᭳ኸᔮᕹᵞ౮
22 . فے౯ժ Nacos ᐒ܄Իၞᗭ 9 ᗭ ᴨ᯾૬૬Ӿᳵկஙلמռݩ https://nacos.io https://github.com/alibaba/nacos
23 . ᕮ • ਧԎଚՕᕨԧᨮጱ༷ஷ • Օᕨԧᴨ᯾૬૬चԭᨮጱଫአ࣋ว݊ದ֛ᔮ • Օᕨԧ๐ݎۓሿکᨮጱቘஷᦊᎣ܋ᕆ • Օᕨԧහഝᓒဩḝۖጱᔜᕡၞᰁഴګጱ “ᨮ”ቘஷ
24 .