文字内容
1. ங๐‫ۓ‬ຝ຅ਫ᪢ ๷ᰭ࿆ ࠔߝտմӱଫአຝ຅᮱ຝ຅૵ 1
4. ᛔ౯Օᕨ • 8ଙຝ຅݊ದ๞ࢫᴚᓕቘᕪḵ҅ሿձࠔ ߝտմӱ/ଫአຝ຅᮱ຝ຅૵҅ᨮᨱᬩ ០ଘ‫̵ݣ‬ኪࠟଘ‫ݣ‬໐ஞԻฃຝ຅ᥢ ‫“̵ښ‬419ߝᇈᇙ‫”ᜓܕ‬य़‫“̵׏‬616ଙӾ ᇙ‫”ܕ‬य़‫׏‬ᒵຝ຅Ҕ • ܲձᨬᘱದ๞௛ፊ҅ᗑฃṛᕆૡᑕ ૵Ҕ • ࢵٖᶮᕆದ๞य़տArchSummit ‫ق‬ቖຝ ຅૵શտᦖ૵̵ᗑฃԯฃᕪ૲᭲ᦖ ૵̶ 2
5. ፓ୯ N 初探微服务架构 N 深s微服务架构 N 微服务架构在电商大o活动W的实践 N T一b微服务架构4ervice /eHh 3
6. ‫ڡ‬റங๐‫ۓ‬ຝ຅ 4
7. ங๐‫ ۓ‬VS ‫֛ܔ‬ଫአ ౮๜ ‫֛ܔ‬ଫአ ங๐‫ۓ‬ x ᥢཛྷ • ‫֛ܔ‬ଫአ҅Ӟ୏ত҅ದ๞ᵙଶ̵֗౮๜֗҅‫ݢ‬զள᭛ඪඅ‫҅઀ݎ‬ᘒங๐‫ۓ‬Ӟ୏তኧԭದ๞ᵙଶय़҅౮๜ፘ੒տ ṛ • ᵋ፳ଫአᥢཛྷ‫҅઀ݎ‬ፘଫጱ౮๜᭑Ⴙ൉ṛ҅୮ᬡ‫ک‬xԻ݉ᅩ҅‫֛ܔ‬ଫአጱ౮๜᩼๶᩼ṛԭங๐‫҅ۓ‬ᘒங๐‫ۓ‬ጱ ս۠᭑Ⴙดሿ҅౮๜᭑Ⴙᖌ೮ᑞਧ • ୮Ӟ୏তᭌೠጱฎ‫֛ܔ‬ଫአຝ຅҅୮ᥢཛྷಘୟ‫ک‬Xᅩ෸҅੪‫ݢ‬զᘍᡤᄍᬰ‫ک‬ங๐‫ۓ‬ຝ຅҅ᘒইຎӞ୏ত੪ᭌೠ ԧங๐‫ۓ‬ຝ຅҅‫ڞ‬ᥝಥ೅‫ڡ‬তጱṛ౮๜զ݊ದ๞ᵙଶ҅֕‫ݸ‬๗ጱ౮๜տ᩼๶᩼֗҅ս۠տ᩼๶᩼ดሿ 5
8. Ջԍฎங๐‫ۓ‬ ᛔလ! • • • • ᇿᒈ! ᬰᑕ! ங๐‫ۓ‬ฎӞԶ‫ݶܐ‬ૡ֢ጱੜᘒᛔလጱ๐‫ۓ‬ ྯӻ๐‫ݎ୏ۓ‬౮‫ܔ‬Ӟଫአጱ୵ୗ҅ྯӻଫአᬩᤈࣁ‫ܔ‬ӞጱᬰᑕӾ ֵአᛔۖ۸᮱ᗟૡٍᬰᤈᇿᒈ‫૲ݎ‬ ྯӻ๐‫ݢۓ‬զֵአӧ‫ݶ‬ጱ୏‫᥺᧍ݎ‬զ݊ӧ‫ݶ‬හഝਂ‫ؙ‬ದ๞ 6 ᇿᒈ! ᮱ᗟ! ‫!૲ݎ‬
9. ங๐‫ۓ‬ຝ຅ቘᦞचᏐ—଼শਧ஌ ଼শਧ஌ғᕟᕢຝ຅ᒵ‫ݶ‬ᔮᕹຝ຅ ᒫӞਧ஌ғᕟᕢဋ᭗ොୗ٬ਧᔮᕹᦡᦇ ᒫԫਧ஌ғ෸ᳵٚग़ӞկԪఘԞӧ‫ݢ‬ᚆ ؉ጱਠᗦ҅֕௛ํ෸ᳵ؉ਠӞկԪఘ ᒫӣਧ஌ғᕚࣳᔮᕹ޾ᕚࣳᕟᕢຝ຅ᳵ ํᄟࣁጱ୑ᨶ‫ݶ‬ாᇙ௔ ᒫࢥਧ஌ғय़ጱᔮᕹᕟᕢ௛ฎྲੜᔮᕹ ๅ‫ݻ؁‬ԭ‫ړ‬ᥴ 7
10. ங๐‫ۓ‬ᇙ௔ ‫֛ܔ‬ᔮᕹ • ᕟկӨ๐‫ۓ‬ • ࢱᕰӱ‫ۑۓ‬ᚆᬰᤈᕟᕢ • ‫ړ‬වလቘ • ‫ړ‬වහഝᓕቘ • चᏐᦡෞᛔۖ۸ 8 ங๐‫ۓ‬
11. ங๐‫ۓ‬ᇙ௔—ࢱᕰӱ‫ۑۓ‬ᚆᬰᤈᕟᕢ ‫֛ܔ‬ଫአ ‫ڹ‬ᒒ ‫ݸ‬ᒒ ᬩᖌ ங๐‫ۓ‬ 9
12. ங๐‫ۓ‬ᇙ௔—‫ړ‬වහഝᓕቘ ங๐‫ۓ‬ ‫֛ܔ‬ଫአ 10
13. ԅՋԍ୚‫ف‬ங๐‫ۓ‬ ӱ‫ۓ‬ᥴᘠ ದ๞୑຅ ᇿᒈᖌಷ ᇿᒈ᮱ᗟ ᇿᒈಘ઀ ൉‫܋‬Ꮈ‫ݎ‬පሲ ํපᵍᐶඳᵑ ೲᆙӱ‫ۓ‬ᬟኴ ೆ‫ړ‬ԅग़ӻᇿ ᒈጱ๐‫҅ۓ‬ᥴ ٬ԧӱ‫॔ۓ‬๥ ௔ᳯ᷌҅ਫሿ ӱ‫ۓ‬ᥴᘠ҅ӱ ‫ٖۓ‬᮱ṛٖ ᘸ҅ӱ‫ۓ‬ԏᳵ ຂᘠ‫ྯ҅ݳ‬ӻ ๐‫ۓ‬ᬟኴႴ ศ҅‫ݶ‬෸‫ܔ‬ӻ ๐‫ۓ‬ጱդᎱᰁ ๅ੝̵ๅ‫ے‬ฃ ᖌಷ ӧ‫ݶ‬ጱࢫᴚᖌ ಷӧ‫ݶ‬ጱ๐ ‫ݢ҅ۓ‬զᰒ੒ ӧ‫ݶ‬ጱӱ‫ۓ‬᯻ አӧ‫ݶ‬ጱದ๞ ໛ຝ҅ํᰒ੒ ௔ጱᥴ٬௔ᚆ ኒ᷀҅‫ݶ‬෸‫ݢ‬ զᭌೠ‫ݳ‬ᭇጱ ෛದ๞ᥴ٬᭬ ‫ک‬ጱෛದ๞ᵙ ᷌ ӧ‫ݶ‬ጱࢫᴚᖌ ಷӧ‫ݶ‬ጱ๐‫ۓ‬ ᕟկ҅ྯӻࢫ ᴚ‫ݢ‬զ‫ڦړ‬ᥢ ‫ښ‬ᛔ૩ጱ๐ ‫҅ۓ‬ፘ԰ԏᳵ ԰ӧ୽ߥ҅ྯ ӻࢫᴚᘸᆌᛔ ૩ᨮᨱጱ๐‫ۓ‬ ྯӻ๐‫ݢۓ‬զ ᇿᒈ᮱ᗟ҅԰ ӧ୽ߥ҅‫ݢ‬զ ਫሿᇿᒈ಑ ۱̵ᇿᒈၥ ᦶ̵ᇿᒈ᮱ ᗟ҅‫ٺ‬੝᮱ᗟ ෸ᳵ҅൉‫܋‬᮱ ᗟ᭛ଶ๋҅ᕣ ൉‫܋‬Ꮈ‫ݎ‬පሲ ‫ݢ‬զ໑ഝӱ‫ۓ‬ ጱᥢཛྷ‫ݳ‬ቘᥢ ‫ښ‬๐‫ۓ‬ጱ᮱ᗟ ᥢཛྷ҅ইຎӱ ‫ۓ‬ᰁय़҅‫ڞ‬᮱ ᗟጱ๐‫࢏ۓ‬ᥢ ཛྷय़҅ইຎӱ ‫ۓ‬ᰁੜ҅‫ݢڞ‬ զ੝᮱ᗟ‫ݣپ‬ ๐‫࢏ۓ‬ ‫ݢ‬զਫሿଚᤈ Ꮈ‫ེྯ҅ݎ‬ෛ ᶱፓᎸ‫҅ݎ‬᮷ ‫ݢ‬զೲᆙӱ‫ۓ‬ ‫҅ړښ‬ӧ‫ݶ‬ጱ ӱ‫ۑۓ‬ᚆ‫ڦړ‬ ᤩೆᥴ‫ک‬ӧ‫ݶ‬ ጱࢫᴚ҅ӧ‫ݶ‬ ጱࢫᴚ‫ᦡڦړ‬ ᦇᛔ૩ጱ๐ ‫҅ۓ‬ᖽᎨ๐‫ۓ‬ Ի՞෸ᳵ҅൉ ‫܋‬๐‫ۓ‬Ի՞ප ሲ ྯӻ๐‫ۓ‬ᇿᒈ ᮱ᗟ̵ᇿᒈᬩ ᖌ҅୮᮱‫ړ‬๐ ‫ڊۓ‬ሿඳᵑԏ ‫ݢ҅ݸ‬զਖ਼ඳ ᵑํපᵍᐶ҅ ᘒӧ୽ߥٌ՜ ๐‫ۓ‬ጱᑞਧ ௔҅ํපᵍᐶ ඳᵑጱ᝜ࢱ҅ ‫כ‬ᵑᔮᕹෆ֛ ጱᑞਧ௔ 11
14. ই֜຅ୌங๐‫ۓ‬ຝ຅ N 如何定义服务 N 如何发布和订阅服务 N 如何治理服务 N 如何监控服务 N 如何定h故障 N ...... 12
15. ங๐‫ۓ‬ຝ຅ • Ӟӻᓌ‫ܔ‬ጱங๐‫ۓ‬ຝ຅۱‫ތ‬ங๐‫ۓ‬ ਮಁᒒ̵ங๐‫ۓ‬๐‫ۓ‬ᒒ̵ဳٙӾ ஞ̵ፊഴӾஞ Registry! ᦈᴅ • Serviceࣁ‫ۖސ‬෸҅ਖ਼ᛔ૩൉‫׀‬ጱ๐ ‫ဳۓ‬ٙ‫ဳک‬ٙӾஞ • Clientࣁ‫ۖސ‬෸҅՗ဳٙӾஞᦈᴅᛔ ૩ᵱᥝጱ๐‫ۓ‬ Client! • Clientᦈᴅ๐‫ۓ‬ԏ‫᧣҅ݸ‬አService ๐‫ۓ‬ ဳٙ ᧣አ Ӥಸ෭ப • Client޾Serviceਖ਼෭பӤಸ‫ک‬ Monitor Ӥಸ෭ப Monitor! • ๐‫ۓ‬လቘӾஞਫሿᓕቘᴳᕆ̵ᴴ ၞ̵๐‫ۓ‬᪠ኧ̵๐‫ۓ‬ᨮ᫹࣐ᤍᒵ 13 Service! ๐ ‫ۓ‬ လ ቘ! Ӿ ஞ!
16. ๐‫ۓ‬ൈᬿ XMLᯈᗝ XMLᯈᗝ‫ݢ‬զአԭdubbo໛ຝ̵Spring Cloud໛ຝ ᒵ <beans> <dubbo:application name="demo-provider"/> <dubbo:registry address="zookeeper://127.0.0.1:2181"/> <dubbo:protocol name="dubbo" port="20890"/> <bean id="demoService" class="org.apache.dubbo.samples.basic.impl.DemoServiceImpl"/> <dubbo:service interface="org.apache.dubbo.samples.basic.api.DemoService" ref="demoService"/> </beans> IDL @idl @namespace(“com.hello.world”) Public class HelloWorldIDL{ @service(version=“1.0.0”) interface HelloWorld{ String sayHello(String helloMsg) } } IDL᭗ଉአԭThrift̵gRPC᪜᧍᥺᧣አ໛ຝ 14
17. ๐‫ۓ‬໛ຝ N 服务通p协议OH552、5C2、U(2等P N 数据f输方式O同步、异步P N 数据序列化OJ41N序列化、2B序列化等P 15
18. ๐‫૲ݎۓ‬/ᦈᴅ • Service‫ۖސ‬෸ਖ਼๐‫ဳۓ‬ٙ‫ک‬ Registry҅‫ݶ‬෸ᖌ೮ӨRegistryጱஞ ᪡ਧ๗࿤ಸਂၚᇫா Registry! • Clientࣁ‫ۖސ‬෸՗ဳٙӾஞᦈᴅᵱᥝ ጱ๐‫҅ۓ‬୮๐‫ۖݒํۓ‬෸҅ Registryտ݊෸᭗ᎣClient೉‫๋ݐ‬ෛ ጱ๐‫ڜۓ‬ᤒ҅ๅෛ๜ࣈ๐‫ڜۓ‬ᤒ ᦈᴅ/‫ݒ‬ๅ᭗Ꭳ Client! • Clientտਖ਼឴‫ݐ‬ጱ๐‫ڜۓ‬ᤒᖨਂࣁ๜ ࣈ҅୮ClientӨRegistryԏᳵጱᗑᕶ ‫ڊ‬ሿᳯ᷌෸҅Ԟӧ୽ߥClientӨ Serviceጱ᧣አ • Registry൉‫׀‬๐‫ဳۓ‬̵ٙ‫ဳݍ‬̵ٙ ஞ᪡࿤ಸ̵ᦈᴅ̵‫ݒ‬ๅັᧃᒵള‫ݗ‬ 16 ဳٙ/ஞ᪡ ᧣አ Service!
19. ๐‫ۓ‬᪠ኧ N 灰度发布 N A/B测试 N 流量控制 N 机房选择 N ...... # app1ጱၾᩇᘏ‫ݝ‬ᚆᦢᳯಅํᒒ‫ݗ‬ԅ20880ጱ๐‫ۓ‬ਫֺ # app2ጱၾᩇᘏ‫ݝ‬ᚆᦢᳯಅํᒒ‫ݗ‬ԅ20881ጱ๐‫ۓ‬ਫֺ --scope: application force: true runtime: true enabled: true key: governance-conditionrouter-consumer conditions: - application=app1 => address=*:20880 - application=app2 => address=*:20881 # DemoServiceጱsayHelloොဩ‫ݝ‬ᚆᦢᳯಅํᒒ‫ݗ‬ԅ20880ጱ๐ ‫ۓ‬ਫֺ # DemoServiceጱsayHiොဩ‫ݝ‬ᚆᦢᳯಅํᒒ‫ݗ‬ԅ20881ጱ๐‫ۓ‬ ਫֺ --scope: service force: true runtime: true enabled: true key: org.apache.dubbo.samples.governance.api.DemoService conditions: - method=sayHello => address=*:20880 - method=sayHi => address=*:20881 17
20. ๐‫ۓ‬ᨮ᫹࣐ᤍ ᵋ๢ᓒဩ ᫪ᧃᓒဩ ๋੝ၚ᪋᧣አහᓒဩ Ӟᛘ௔hashᓒဩ ܻቘғ՗๐‫ڜۓ‬ᤒӾ҅ ᵋ๢ᭌೠӞӻ๐‫ۓ‬ਫֺ ᬰᤈ᧣አ̶Ӟᛱฎ໑ഝ ๐‫ڜۓ‬ᤒහ҅ྲইํ8 ӻ๐‫҅ۓ‬ᵋ๢ኞ౮1~8 ԏᳵጱӞӻᵋ๢හ҅ᵋ ๢හฎ‫҅پ‬੪᧣አߺӻ ๐‫ۓ‬ਫֺ ܻቘғ՗๐‫ڜۓ‬ᤒӾ҅ ׁེ᫪ᧃ҅ᭌೠ‫ڊ‬Ӟӻ ๐‫ۓ‬ਫֺᬰᤈ᧣አ̶Ӟ ᛱฎֵአහᕟ҅ྲইํ 8‫ݣ‬๐‫ۓ‬ਫֺ҅ਧԎӞ ӻහᕟ҅۱‫ތ‬1~8හ ਁ҅Ӟེ᫪ᧃහᕟ‫ݢܨ‬ ܻቘғ՗๐‫ڜۓ‬ᤒӾ҅ ᭌೠၚ᪋ᬳളහ๋੝ጱ ๐‫ۓ‬ਫֺᬰᤈ᧣አ҅ྯ ӻ๐‫ۓ‬ਫֺ‫ڠ‬ୌӞӻᬳ ള҅ၚ᪋ᬳളහ‫ے‬1, ܻቘғ᭗ᬦߢ૶‫ڍ‬හ҅ ‫ݢ‬զਖ਼๶ᛔ‫ݶ‬Ӟ᧣አො ጱਮಁᒒ᧗࿢҅ྯེ᮷ ᧗࿢‫ک‬ፘ‫ݶ‬ጱ๐‫ۓ‬ਫֺ ࣋วғԆᥝᭇአԭ๐‫ۓ‬ ਫֺಅࣁ๢࢏ᯈᗝ૧୑ ӧय़҅௔ᚆच๜ፘ‫ݶ‬ጱ ࣋ว ࣋วғԞฎԆᥝᭇአԭ ๐‫ۓ‬ਫֺಅࣁ๢࢏ᯈᗝ ૧୑ӧय़҅௔ᚆच๜ፘ ‫ݶ‬ጱ࣋ว ࣋วғ୮๐‫ۓ‬ਫֺಅࣁ ๢࢏௔ᚆ૧୑ྲ᫾य़ ෸҅᯻አ๋੝ၚ᪋᧣አ හᓒဩ҅‫ݢ‬զ឴‫ݐ‬ๅள ጱߥଫ ࣋วғᭇአԭᔄ֒๐‫ۓ‬ ᒒᖨਂԧਮಁᒒ᧗࿢හ ഝጱ࣋ว҅ྯེ᮷᧗࿢ ፘ‫ݶ‬๐‫ۓ‬ਫֺ҅‫ݢ‬զ‫כ‬ ᵑੱ‫ݢ‬ᚆग़ጱ឴‫ݐ‬ᖨਂ 18
21. ๐‫ۓ‬᩻෸/᯿ᦶ ๐‫ۓ‬᩻෸ ๐‫ۓ‬᯿ᦶ ๐‫ۓ‬᩻෸෸ᳵᦡਧ҅ᵱᥝᭌೠӞӻ ‫ݳ‬ቘጱ᩻෸෸ᳵ҅᩻෸෸ᳵᦡᗝጱ ᬦᳩ౲ᘏᬦᎨ᮷ӧ‫ݢ‬ᤈ҅‫ݢ‬զ᭗ᬦ ‫ړ‬ຉ᧣አ෭ப҅ᕹᦇ‫ڊ‬99.99%̵ 99.9%̵99%ᒵӧ‫ݶ‬ᖌଶጱ๐‫᧣ۓ‬ አ෸ᳵ॒ԭग़੝෸ᳵզٖ҅ᆐ‫ݸ‬ٚ ໑ഝӱ‫ۓ‬ᵱ࿢҅ਧ‫ڊ‬Ӟӻ‫ݳ‬ቘጱ๐ ‫ۓ‬᩻෸෸ᳵ ‫ݎ؍‬ጱ๐‫᧣ۓ‬አ०ᨳӞᛱฎኧԭӻ ‫ڦ‬๐‫ۓ‬ਫֺጱᗑᕶӧᑞਧ੕ᛘ०ᨳ ౲ᘏ᩻෸ᒵ҅ࢩྌᴻԧᰒ੒๐‫ᦡۓ‬ ᗝ᩻෸෸ᳵԏक़҅ᬮտᦡᗝ᯿ᦶེ හ҅᭗ᬦ᯿ᦶ҅ਖ਼᧗࿢‫ݎ‬ᭆ‫ٌک‬՜ ๐‫ۓ‬ਫֺ҅‫ݢ‬զी‫ے‬አಁ᧗࿢౮‫ۑ‬ ሲ 19
22. ๐‫ۓ‬ᆤෙ • ๐‫ۓ‬ᆤෙᇫாӞᛱ‫ړ‬ԅӣᐿ҅closedᇫா̵ openᇫா̵Half-Openᇫா close d • ᆤෙ࢏ἕᦊ॒ԭclosedᇫா‫ىܨ‬ᳮ ᧣አ ౮‫ۑ‬ሲᬡຽ ᧣አ०ᨳሲ ᩻ᬦᴇ꧊ • ୮Ӟਧ෸ᳵٖጱ०ᨳሲ᩻ᬦ೰ਧᴇ꧊҅ᆤෙ ࢏՗closedᇫாᬰ‫ف‬openᇫா҅ྌ෸ਮಁᒒ ‫ݎ‬᩸ጱ๐‫᧣ۓ‬አտፗളᬬࢧ҅ӧտٚ‫ݻ‬๐‫ۓ‬ ᒒ᧗࿢ • ୮ᆤෙ࢏ᆤෙӞྦྷ෸ᳵԏ‫ݸ‬ҁ‫ݢ‬զᦡᗝ҂҅ ྌ෸տᬰ‫ف‬Half-openᇫா҅๐‫ۓ‬ᒒտ੒क़൉ ‫ํ׀‬ᴴጱ๐‫᧣ۓ‬አ҅ইຎ᧣አ౮‫ۑ‬ሲᖀᖅӧ ᬡຽ҅‫ڞ‬՗Half-Openᇫா݈᫨ԅopenᇫ ா҅ইຎ᧣አ౮‫ۑ‬ሲᬡຽ҅‫ڞ‬՗Half-Openᇫ ா᫨ԅclosedᇫா҅๐‫ۓ‬ᒒྋଉ੒क़൉‫׀‬๐ ‫᧣ۓ‬አ open ᆤෙӞྦྷ෸ᳵ ᧣አ౮‫ۑ‬ሲӧᬡຽ 20 HalfOpen
23. ๐‫ۓ‬ᵞᗭ਻Კ • Failover҅०ᨳᛔۖ‫ڔ‬ഘ҅୮‫ڊ‬ሿ०ᨳ҅᯿ᦶٌ՜ ๐‫࢏ۓ‬ զDubboԅֺ • Failfast҅ள᭛०ᨳ҅‫ݎݝ‬᩸Ӟེ᧣አ҅०ᨳᒈ‫ܨ‬ ಸᲙ҅᭗ଉአԭᶋ଍ᒵ௔ጱٟ඙֢ • Failsafe҅०ᨳਞ‫ڊ҅ق‬ሿ୑ଉ෸҅ፗള஺ኼ҅᭗ ଉአԭٟ‫ف‬෭பᒵ඙֢ • Failback҅०ᨳᛔۖ௩॔҅‫ᦕݣݸ‬୯०ᨳ᧗࿢҅ ਧ෸᯿‫҅ݎ‬᭗ଉአԭၾ௳᭗Ꭳᒵ඙֢ • Forking҅ଚᤈ᧣አग़ӻ๐‫ݝ҅࢏ۓ‬ᥝӞӻ౮‫ܨۑ‬ ᬬࢧ҅᭗ଉአԭਫ෸௔ᥝ࿢᫾ṛጱ᧛඙֢҅֕ᵱ ᥝၵᩇྲ᫾ग़ጱᩒრ 21
24. ๐‫ۓ‬ᴴၞ • ऒᴴၞ҅ᰒ੒ෆӻᔮᕹ‫ݢ‬զඪ೮ጱ๋य़QPS҅ᦡ ਧᔮᕹᕆጱᴴၞय़ੜ҅ᴠྊ᩻ᬦෆӻᔮᕹጱ๋य़ QPS๋҅ᕣਖ਼ᔮᕹܴྒ ऒᴴၞ! • IPᴴၞ҅ᰒ੒ӞԶ௶఺ධ‫ڋ‬አಁ̵ἓԾአಁᒵ҅ᵱ ᥝ໑ഝIP؉ᴴၞ҅ྲই‫ܔ‬IPྯ‫ړ‬ᰦٖᦢᳯེහ᩻ᬦ 1000҅‫ڞ‬ᰒ੒ᧆIP؉ᴴၞ IPᴴၞ! • ള‫ݗ‬ᴴၞ҅ํ෸‫ܔ‬ӻള‫ݗ‬ጱ௔ᚆ؇૧౲ᘏӞԶಢ ᰁ឴‫ݐ‬ള‫ྲݗ‬᫾ᘙ෸҅ᵱᥝᰒ੒ྌᔄള‫ݗ‬؉ള‫ݗ‬ ᴴၞ҅ᦢᳯ‫ܔ‬ള‫ᦢݗ‬ᳯᰁᬦय़๋҅ᕣਖ਼ෆӻᔮᕹ ‫ंڋ‬ ള‫ݗ‬ᴴၞ! 22
25. ๐‫ۓ‬ᴳᕆ ᛔۖᴳᕆ ୏‫ى‬ᴳᕆ ۖாᯈᗝᴳᕆ ‫ݢ‬զ᯻አ᩻෸ᴳᕆ̵० ᨳེහᴳᕆ̵ඳᵑᴳᕆ ᒵ҅ਫሿᛔۖᴳᕆ ୏‫ى‬ᴳᕆ҅Ӟᛱਖ਼ᴳᕆ ୏‫૲ړࣁਂى‬ୗᯈᗝӾ ஞ҅ᵱᥝᬰᤈᴳᕆ඙֢ ෸҅ࣁᯈᗝӾஞ඙֢‫ܨ‬ ‫ݢ‬ ࣁဳٙӾஞٟ‫ۖف‬ாᯈ ᗝᥟፍᥢ‫҅ڞ‬᭗ᬦ๐‫ۓ‬ ᴳᕆԁ෸੽ᠰ຤ӻ‫ڊ‬Კ ጱᶋ‫ى‬Ძ๐‫҅ۓ‬ଚਧԎ ᴳᕆ‫ݸ‬ጱᬬࢧᒽኼ • ୮ᔮᕹᦢᳯᰁ᩻ᬦᶼਧጱQPSᴇ꧊෸҅ᵱᥝਖ਼ӞԶᶋ᯿ᥝጱ̵ᶋ໐ஞጱӱ‫ۓ‬ ᬰᤈᴳᕆ҅ฮ؊ٌ੒๐‫ۓ‬ᬰᤈጱ᧣አ 23
26. ๐‫ۓ‬᭄᪵ • ᨕྈDapperғDapper, a Large-Scale Distributed Systems Tracing Infrastructure traceidғ10000 Spanidғ1 traceidғ10000 Spanidғ1.1 traceidғ10000 Spanidғ1.2 ๐‫ۓ‬B1 ๐‫ۓ‬B2 ๐‫ۓ‬B3 ๐‫ۓ‬C1 ๐‫ۓ‬C2 ๐‫ۓ‬C3 traceidғ10000 • traceid҅ຽᦕӞེ᧣አ᱾ֵ҅አtraceid ‫ݢ‬զਖ਼ෆӻ᧣አ᱾Ӥಅํጱ᧣አԀ᩸๶҅ ᬰᘒਫሿ‫ق‬᱾᪠᭄᪵ ๐‫ۓ‬A • spanid҅ຽᦕྯӞӻৼᜓᅩጱ᧣አ҅ਖ਼ ಅํጱspanid೪ള᩸๶҅੪ฎӞེ᧣አ᱾ ጱಅํ᧣አ traceidғ10000 Spanidғ2 24 traceidғ10000 Spanidғ2.1 traceidғ10000 Spanidғ2.2
27. ๐‫ۓ‬ፊഴ ᔮᕹᕆ‫ڦ‬ • ᕹᦇᔮᕹᕆ‫ڦ‬զ݊ള‫ݗ‬ᕆ‫ڦ‬ӷᐿᖌଶፊഴ ೰ຽහഝ • ᰒ੒ߥଫ෸ᳵᕹᦇ҅‫ݢ‬զᕹᦇߥଫ෸ᳵ 0~10ms̵10~50ms̵50ms~100ms̵ 100~500ms̵500~1000ms̵ 1000~2000ms̵2000~5000ms̵ >5000msᒵ҅᭗ᬦᕹᦇᔮᕹ/ള‫ߥݗ‬ଫ෸ ᳵ‫ݢ҅ྲܛ‬զଆۗᦡᗝ᩻෸෸ᳵզ݊ս۸ ᔮᕹզ݊ള‫ݗ‬௔ᚆᒵ • ᰒ੒୑ଉ᧗࿢҅०ᨳሲᬡ‫ک‬Ӟਧᴇ꧊҅‫ݢ‬ զ‫ݎ‬ಸᦄၾ௳ᒵ ള‫ݗ‬ᕆ‫ڦ‬ ๋य़QPS ௛QPS ௛᧗࿢ེහ ౮‫᧗ۑ‬࿢ེහ ०ᨳ᧗࿢ེහ ౮‫ۑ‬ሲ ०ᨳሲ ߥଫ෸ᳵᕹᦇ Top᧗࿢ ၞᰁ୑ۖ੒ྲ …… 25
28. Ⴎ‫ف‬ங๐‫ۓ‬ຝ຅ 26
29. ই֜ᭌೠங๐‫ۓ‬໛ຝ • ಘ઀௔҅ᵱᥝᘍᡤங๐‫ۓ‬໛ຝฎ‫ވ‬ඪ೮ಘ ઀҅ࣁ‫ݸ‬ᖅጱ୏‫ݎ‬ӾํԶ‫ۑ‬ᚆᵱᥝਧ‫ګ‬۸ զ݊ಘ઀҅‫ڞ‬ฎ‫ވ‬ඪ೮ಘ઀௔ਖ਼֢ԅӞӻ உ᯿ᥝጱᘍᰁ • ᪜᧍᥺҅ӧ‫ํݪلݶ‬ӧ‫ݶ‬ጱ୏‫ํ҅᥺᧍ݎ‬ Զ‫ࣁਂݪل‬ग़ᐿ୏‫ྌࢩ҅᥺᧍ݎ‬ฎ‫ވ‬ඪ೮ ᪜᧍᥺զ݊ඪ೮֜ᐿ୏‫᥺᧍ݎ‬Ԟฎᤍᰁᭌ ೠӞӻங๐‫ۓ‬໛ຝஉ᯿ᥝጱࢩᔰ ಘ઀௔! Dubbo! SpringCloud! Thrift! gRPC! অ! অ! অ! অ! Java̵Python̵ Java̵Python̵C+ Java̵C++̵ Node.jsᒵҁᵱᥝ +̵Node.jsᒵग़᧍ Python̵Node.jsᒵ sidecarᕟկඪ೮҂! ᥺! ग़᧍᥺! ᪜᧍᥺! Java! ᭗‫!ᦓܐמ‬ TCP/HTTP! HTTP! TCP! HTTP/2! ଧ‫ڜ‬۸‫!ᦓܐ‬ Kryo/FST/Hessian! Jackson! Thrift! ProtoBuf! • ᭗‫ํ҅ᦓܐמ‬ጱ๐‫ۓ‬۸໛ຝ‫ݝ‬ඪ೮HTTP‫ܐ‬ ᦓ̵ํጱඪ೮TCP‫ํ̵ᦓܐ‬ጱӷᘏ࣐ඪ ೮҅ӧ‫ݶ‬ጱ‫ᦓܐ‬௔ᚆӧ‫҅ݶ‬ইຎ੒௔ᚆᥝ ࿢ྲ᫾ṛ‫ڞ‬տᭌೠTCP‫҅ᦓܐ‬ইຎ੒௔ᚆ ᥝ࿢ӧṛ‫ݢڞ‬զᭌೠHTTP‫ᦓܐ‬ 27
30. ই֜ᭌೠ‫ݳ‬ᭇጱဳٙӾஞ • ṛ‫ݢ‬አ௔҅ဳٙӾஞጱṛ‫ݢ‬አ௔ฎӞӻᶋ ଉ᯿ᥝጱᘍᰁ҅ള‫ف‬ங๐‫ۓ‬ຝ຅ԏ‫҅ݸ‬ಅ ํ๐‫ۓ‬᮷ဳٙࣁဳٙӾஞ҅ইຎဳٙӾஞ ṛ‫ݢ‬አਂࣁᳯ᷌҅ਖ਼տ୽ߥ‫ک‬๐‫ۓ‬൉‫׀‬ᘏ ੒क़ูᶂᛔ૩ጱ๐‫ۓ‬ • හഝӞᛘ௔҅ဳٙӾஞಥ೅๐‫ဳۓ‬ٙզ݊ ๐‫ᦈۓ‬ᴅ҅Ӟᛱ᮷տ֢ԅᵞᗭ᮱ᗟ҅உग़ ෸‫ײ‬ᬮտ᮱ᗟࣁग़IDC๢಄҅ࢩྌහഝӞᛘ ௔݈౮ԅ౯ժጱӞӻᘍᰁ҅ই֜‫כ‬ᵑහഝ Ӟᛘ௔҅ၿ݊‫ک‬CAPቘᦞ Eureka! ZooKeeper! Consul! etcd! APҁṛ‫ݢ‬አ/‫ړ‬ ‫਻܄‬Კ҂! ඪ೮! ӧඪ೮! ӧඪ೮! ӧඪ೮! CPҁӞᛘ௔/‫ړ‬ ‫਻܄‬Კ҂! ӧඪ೮! ඪ೮! ඪ೮! ඪ೮! ग़හഝӾஞ! -! ඪ೮! ඪ೮! ඪ೮! Ӟᛘ௔ᓒဩ! -! paxos! raft! raft! • ग़හഝӾஞ᮱ᗟ҅உग़ӱ‫ۓ‬๐‫࣐ۓ‬տ᮱ᗟ ࣁग़IDC๢಄҅ࢩྌฎ‫ވ‬ඪ೮ग़හഝӾஞԞ ฎӞӻஉ᯿ᥝጱᘍᡤ 28
31. ই֜ᭌೠ‫ݳ‬ᭇጱᯈᗝӾஞ • ᯈᗝኞප݊෸௔҅ᯈᗝ‫ࣁؙਂ௳מ‬ᯈᗝӾ ஞ҅୮‫ݸ‬ᖅᰒ੒ᯈᗝ‫௳מ‬ᬰᤈ‫ץ‬ද‫҅ݸ‬ฎ ‫ݢވ‬զ݊෸ள᭛വᭆᕳ‫ݱ‬ᔮᕹ҅ฎӞӻᶋ ଉ᯿ᥝጱᘍᡤᅩ • ग़හഝӾஞ᮱ᗟ҅உग़ӱ‫ۓ‬๐‫࣐ۓ‬տ᮱ᗟ ࣁग़IDC๢಄҅ࢩྌฎ‫ވ‬ඪ೮ग़හഝӾஞԞ ฎӞӻஉ᯿ᥝጱᘍᡤ • ฃአ௔҅ᯈᗝӾஞጱ඙֢ฃአ௔Ԟஉ᯿ ᥝ҅ฎ‫ވ‬൉‫ݢ׀‬ᥤ۸඙֢ኴᶎ҅ฎ‫ݢވ‬զ ள᭛ᖫᬋᯈᗝ‫௳מ‬ᒵ Apollo! Disconf! Spring-cloud-config! ᯈᗝኞප! ਫ෸! ਫ෸! ᯿‫ސ‬౲ᘏಋۖrefresh! ᯈᗝๅෛവᭆ! ඪ೮! ඪ೮! ಋૡ᥶‫!ݎ‬ ᯈᗝኴᶎ! ඪ೮! ඪ೮! ӧඪ೮҅ᵱᥝgitඪ೮! ᯈᗝਧ෸೉‫!ݐ‬ ඪ೮! Client᯿‫ސ‬೉‫!ݐ‬ ӧඪ೮! ग़හഝӾஞ! ඪ೮! ඪ೮! ඪ೮! 29
32. ApolloᯈᗝӾஞຝ຅ ConfigService • ൉‫׀‬ᯈᗝ឴‫ݐ‬/വᭆള‫ݗ‬ • ๐‫ۓ‬ԭApolloਮಁᒒ AdminService • ൉‫׀‬ᯈᗝᓕቘ/‫ץ‬ද/‫૲ݎ‬ള‫ݗ‬ • ๐‫ۓ‬ԭᓕቘኴᶎPortal Client • ԅଫአ឴‫ݐ‬ᯈᗝ҅ඪ೮ਫ෸ๅෛ • ᭗ᬦMetaServer឴‫ݐ‬ConfigServiceጱ๐ ‫ڜۓ‬ᤒ • ֵአਮಁᒒ᫫ᨮ᫹SLBොୗ᧣አ ConfigService Portal • ᯈᗝᓕቘኴᶎ • ᭗ᬦMetaServer឴‫ݐ‬AdminServiceጱ๐ ‫ڜۓ‬ᤒ • ֵአਮಁᒒ᫫ᨮ᫹SLBොୗ᧣አ 30
33. ই֜ᭌೠ‫ݳ‬ᭇጱᆤෙ࢏ • ᆤෙᴳᕆᒽኼ҅ฎचԭߥଫ෸ᳵᬮฎचԭ ०ᨳሲ؉ᆤෙᴳᕆ Sentinel! Hystrix! • ᵍᐶᒽኼ҅ᵱᥝᘍᡤᵍᐶᒽኼ੒ᔮᕹ௔ᚆ ጱ୽ߥ҅ฎ᯻አᕚᑕ࿰ᵍᐶ҅ᬮฎ᯻አଚ ‫ݎ‬හᬰᤈᵍᐶ ᆤෙᴳᕆᒽኼ! चԭߥଫ෸ᳵ/०ᨳྲሲ! चԭ०ᨳྲሲ! ᯈᵍᐶᒽኼ! चԭଚ‫ݎ‬හ! ᕚᑕ࿰ᵍᐶ/‫ݩמ‬ᰁᵍᐶ! ਫ෸೰ຽਫሿ! ჶۖᑻ‫!ݗ‬ ჶۖᑻ‫!ݗ‬ • ၞᰁഴ‫҅ګ‬ฎ‫ވ‬ඪ೮੒ᩒრ᧣አᬰᤈၞᰁ ഴ‫҅ګ‬ਖ਼ᵋ๢ጱ᧗࿢᧣ෆ౮‫ݳ‬ᭇጱ୵ᇫ҅ ᬰᘒਫሿၞᰁෆ୵ ᴴၞ! चԭQPS/ଚ‫ݎ‬හ! ӧඪ೮! ၞᰁෆ୵! ඪ೮ౌ‫̵ۖސ‬۰᭛࢏ཛྷୗ! ӧඪ೮! ᔮᕹᨮ᫹‫כ‬ಷ! ඪ೮! ӧඪ೮! • ᫷ᰁᕆ̵ṛ௔ᚆ҅ฎ‫ވ‬ඪ೮᫷ᰁᕆള‫ف‬෫ ᵱᬦग़ׁᩢ҅୚‫ݸف‬ଃ๶ጱ௔ᚆഖᘙฎ‫ވ‬ ᪃ड़ੜ ഴ‫!ݣګ‬ 31 ඪ೮‫ݢ‬ᯈᗝᥢ‫ັ̵ڞ‬፡ᑁᕆፊഴ̵ ๢࢏‫ݎ‬ሿᒵ! ӧਠ࠺!
34. Sentinelᆤෙ࢏ᇙ௔ ਫ෸ፊഴ! ๢࢏‫ݎ‬ሿ! Spring Cloud! ᥢ‫ڞ‬ᯈᗝ! Sentinelഴ‫ݣګ‬ ၞᰁഴ‫!ګ‬ ᕚᑕහᵍᐶ! ౌ᧣አᴳᕆ! ᧣አ᱾᪠! ᭛ሲഴ‫!ګ‬ ᵞᗭᴴၞ! ୑ଉᆤෙ! ᔮᕹᛔᭇଫ‫כ‬ಷ! Dubbo! gRpc! ᧣አ‫ى‬ᔮᴴၞ! ᅾᅩᴴၞ! ‫ڷ‬શऴᨕ! ۖாᥢ‫ڞ‬ᯈᗝҁZooKeeper̵Nacos̵Apollo҂! 32 ๶რᦢᳯഴ‫!ګ‬ Service Mesh!
35. Sentinelᆤෙ࢏ኞா Sentinel ‫ړ‬ԅӷӻ᮱‫ړ‬: • ໐ஞପҁJava ਮಁᒒ҂ӧׁᩢձ֜໛ຝ/ ପ҅ᚆड़ᬩᤈԭಅํ Java ᬩᤈ෸ሾह҅‫ݶ‬ ෸੒ Dubbo / Spring Cloud ᒵ໛ຝԞํ᫾ অጱඪ೮Ҕ • ഴ‫ݣګ‬ҁDashboard҂चԭ Spring Boot ୏ ‫҅ݎ‬಑۱‫ݢݸ‬զፗളᬩᤈ҅ӧᵱᥝ᷐क़ጱ Tomcat ᒵଫአ਻࢏̶ 33
36. ই֜ᭌೠ‫ݳ‬ᭇጱ‫ق‬᱾᪠᭄᪵ᔮᕹ • ग़᧍᥺ඪ೮҅ইຎ‫ํݪل‬ग़୏‫᧍ݎ‬ ᥺ᵱ࿢҅‫ٖݪل‬᮱ֵአ᪜᧍᥺ங๐ ‫ۓ‬໛ຝ҅‫ق‬᱾᪠᭄᪵ᵱᥝඪ೮ग़୏ ‫҅᥺᧍ݎ‬ᵱᥝ᯿ᅩᘍᡤᬯӻࢩᔰ • դᎱ‫ف׍‬௔҅ํԶ‫ق‬᱾᪠᭄᪵ᵱᥝ ईᅩ̵ೝ౼᧗࿢҅ํԶ‫ق‬᱾᪠᭄᪵ ᭗ᬦਁᜓᎱਫሿ੒դᎱ෫‫ف׍‬ • ‫ق‬ੴ᧣አᕹᦇ҅ํጱ‫ق‬᱾᪠᭄᪵‫ݝ‬ ൉‫׀‬ള‫ݗ‬ጱ᧣አ᱾᪠҅ӧ൉‫׀‬ፘ‫ى‬ ጱහഝପ̵ᖨਂᩒრጱ᧣አ҅ํጱ ‫ܨ‬൉‫׀‬ള‫᧣ݗ‬አ݈൉‫׀‬හഝପ̵ᖨ ਂᒵጱ᧣አ Zipkin! Pinpoint! SkyWalking! CAT! റᰒਫሿොୗ! ೝ౼᧗࿢! JavaറᰒਁᜓᎱी୩! JavaറᰒਁᜓᎱी୩! դᎱईᅩ! ଫአള‫ف‬ොୗ! चԭlinkerd౲ᘏsleuthො ୗ҅୚‫ف‬ᯈᗝ! javaagentਁᜓᎱ! javaagentਁᜓᎱ! դᎱईᅩ‫!ف׍‬ තᵞ෭ப‫!ᦓܐ‬ http̵mq! thrift! gRPC! http/tcp! ‫ق‬ੴ᧣አᕹᦇ! ӧඪ೮! ඪ೮! ඪ೮! ඪ೮! traceidັᧃ! ඪ೮! ӧඪ೮! ඪ೮! ӧඪ೮! ಸᦄ! ӧඪ೮! ඪ೮! ඪ೮! ඪ೮! JVMፊഴ! ӧඪ೮! ӧඪ೮! ඪ೮! ඪ೮! හഝਂ‫!ؙ‬ ES҅mysql,Cassandra,ٖ ਂ! Hbase! ES҅H2! mysql,hdfs! 34
37. Pinpoint‫ق‬᱾᪠᭄᪵ᔮᕹຝ຅ • Collector, තᵞଫአӾagent‫ݎ‬ᭆጱ හഝଚਂ‫کؙ‬HbaseӾ • Agent, ฎ޾ଫአӞ᩸‫ۖސ‬ጱ޾ଫ አ‫و‬ՁJVM҅᭗ᬦJavaਁᜓᎱဳ‫ف‬ ጱොୗ҅๶තᵞJVMӾጱ᧣አහ ഝ҅ਧ෸‫ݎ‬ᭆහഝᕳCollector • Web UI, ՗hbaseӾ᧛‫ݐ‬හഝଚ઀ ᐏᕳአಁ҅ԏ‫ݸ‬տํdemo઀ᐏٌ ‫ۑ‬ᚆ 35
38. CAT‫ق‬᱾᪠᭄᪵ᔮᕹຝ຅ HttpThread ThreadContext ୏ত! ‫ڠ‬ୌၾ௳໅! ၾ௳ၾᩇ๢ ଫአA! Call! ‫ڠ‬ୌCallᜓᅩ! SQL! ‫فے‬SQLᜓᅩ! Cache! ‫فے‬Cacheᜓ ᅩ! ଫአB! ଫአC! …! ୑ ྍ ‫ݎ‬ ᭆ ၾ ௳ Receiver! Analyzer! Receiver! Analyzer ഴ‫!ݣګ‬ Receiver! Analyzer ഴ‫!ݣګ‬ threads Queues threads …! ၾ௳᫨‫ྍ୑ؙ‬ᕚᑕ ᕮ๳! file! ᕮ๳! hdfs! ᕹᦇಸᤒ mysql! CAT๐‫ۓ‬ᒒࣁෆӻਫ෸॒ቘӾ҅च๜Ӥਫሿԧ‫ྍ୑ق‬۸॒ቘ̶ • ၾ௳ളතฎचԭNettyጱNIOਫሿ҅ၾ௳ളත‫ک‬๐‫ۓ‬ᒒ੪ਂනٖਂᴚ‫҅ڜ‬ᆐ‫ݸ‬ᑕଧ୏‫ސ‬Ӟӻᕚᑕտၾᩇᬯӻၾ௳؉ၾ௳‫ݎړ‬ • ྯӻၾ௳᮷տํӞಢᕚᑕଚ‫ݎ‬ၾᩇ‫ݱ‬ᛔᴚ‫ڜ‬ጱහഝ҅զ؉‫ک‬ၾ௳॒ቘጱᵍᐶ • ၾ௳ਂ‫ؙ‬ฎ‫فਂض‬๜ࣈᏺፏ҅ᆐ‫ྍ୑ݸ‬Ӥփ‫ک‬hdfs෈կ҅ᬯԞ᭿‫ع‬ԧ୩ׁᩢhdfs 36
39. ই֜ᭌೠ‫ݳ‬ᭇጱፊഴᔮᕹ • හഝ᯻ᵞ҅ӧ‫ݶ‬ጱፊഴᔮᕹ҅᯻አ හഝ᯻ᵞᕟկጱᕟկӧ‫ݶ‬ • හഝփᬌ҅හഝփᬌฎ᯻‫ݐ‬വጱො ୗᬮฎ᯻‫ݐ‬೉ጱොୗ҅੒ଫአጱ‫׍‬ ‫ف‬ฎ‫ވ‬य़ • හഝ॒ቘਂ‫ؙ҅‬හഝ॒ቘզ݊ਂ‫ؙ‬ ጱ௔ᚆฎ‫ވ‬ṛ҅୏ᲀฎ‫ވ‬य़ᒵ ELK! Graphite! Prometheus! හഝ᯻ᵞ! Filebeat! ᒫӣො᯻ᵞᕟկStatsD! ᭗ᬦjobs/exportsᕟկ឴‫ݐ‬ StatsD᯻ᵞጱ‫!௳מ‬ හഝփᬌ! Logstash! ᒫӣො᯻ᵞᕟկStatsD᯻ᵞ ԏ‫ݸ‬փᬌᕳCarbon! Prometheus Serverਧ๗೉ ‫!ݐ‬ හഝ॒ቘਂ‫!ؙ‬ ElasticSearch! Carbon޾Whister! TSDB! හഝ઀ᐏ! kibana! Grafana! Grafana! • හഝ઀ᐏ҅හഝ઀ᐏኴᶎฎ‫݋ވ‬ অ҅ฎ‫ވ‬୩य़҅ฎ‫ވ‬ᗦᥡᒵ 37
40. ELKፊഴᔮᕹຝ຅ ๐‫!ۓ‬ Filebeat! ๐‫!ۓ‬ Filebeat! Logstash! kafka! ๐‫!ۓ‬ Filebeat! ๐‫!ۓ‬ Filebeat! Logstash! Logstash! 38 Elastic! Search! Kibana! Portal!
41. Graphiteፊഴᔮᕹຝ຅ • Carbon҅᯻ᵞ೰ຽහഝ҅Ḓ‫کਂض‬ carbon-cache๋҅‫ݸ‬೮ԋ۸‫ک‬ Whisper • Whisper҅෸ଧහഝପ҅ਂ‫ؙ‬෸ᳵ ଧ‫ڜ‬හഝ • Graphite-Web҅؉UIኴᶎ̵හഝ઀ ᐏ҅ັᧃහഝ෸҅Ḓ‫ض‬՗carboncacheັᧃ҅ carbon-cacheဌํٚ ՗Whisperັᧃ 39
42. Prometheusፊഴᔮᕹຝ຅ • Jobs/exporters҅ᨮᨱහഝතᵞ҅ଚਖ਼ metricsูᶂᕳPrometheus Server҅ӧ ‫ݶ‬ጱහഝ࿤ಸኧӧ‫ݶ‬ጱexportersਫሿ҅ ྲইፊഴԆ๢ํnode-exporters҅mysql ํMySQL server exporter • Prometheus Server ҅Ԇᥝᨮᨱ೉‫ݐ‬ metrics‫҅௳מ‬ଚਖ਼හഝਂ‫ࣁؙ‬Storage Ӿ • Pushgateway҅‫ݱ‬ӻtarget‫ݢ‬ᚆኧԭӧࣁ Ӟӻৼᗑ౲ᘏᴠᅉा҅੕ᛘ Prometheus Server ෫ဩፗള೉‫ݱݐ‬ӻ target හഝ҅ ࢩྌࣁፊഴӱ‫ۓ‬හഝጱ෸‫҅ײ‬ᵱᥝਖ਼ӧ ‫ݶ‬හഝ࿤௛, ଚኧ Prometheus Server ᕹ Ӟතᵞ • Alertmanager҅Ԇᥝአಁහഝ‫ᦄޞ‬ • Web Ui҅ਫሿහഝኴᶎ઀ᐏ 40
43. ࢱᕰDubbo຅ୌங๐‫ۓ‬ຝ຅ Disconf! zookeeper! • ங๐‫ۓ‬໛ຝ҅᯻አDubbo RPC • ဳٙӾஞ҅᯻አzookeeper ೉‫ݐ‬ᯈᗝ ᦈᴅ ဳٙ ೉‫ݐ‬ᯈᗝ • ᆤෙ࢏҅᯻አSentinel • ᯈᗝӾஞ҅᯻አDisconf • ፊഴᔮᕹ҅᯻አELKਫሿතᵞ ෭பզ݊‫ᦄޞ‬ • ‫ق‬᱾᪠᭄᪵҅᯻አCatਫሿ trace෭பතᵞզ᭄᪵݊ Client! ᧣አ Dubbo SDK! Ӥಸ෭ப Sentinelᆤෙ࢏! ᧣አ Service! Ӥಸ෭ப CAT‫ق‬᱾᪠᭄ ᪵! ELK! 41 Dubbo SDK!
44. ࢱᕰSpring Cloud຅ୌங๐‫ۓ‬ຝ຅ • ங๐‫ۓ‬໛ຝ҅᯻አSpring Cloud • ဳٙӾஞ҅᯻አEureka Spring Cloud Config! Eureka! ೉‫ݐ‬ᯈᗝ ᦈᴅ ဳٙ ೉‫ݐ‬ᯈᗝ • ᆤෙ࢏҅᯻አHystrix • ᯈᗝӾஞ҅᯻አSpring Cloud Config Client! • ፊഴᔮᕹ҅᯻አELKਫሿතᵞ ෭பզ݊‫ᦄޞ‬ • ‫ق‬᱾᪠᭄᪵҅᯻አSpring Cloud Sleuthਫሿtrace෭ப තᵞզ᭄᪵݊ Spring Cloud SDK! ᧣አ Ӥಸ෭ப Hystrixᆤෙ࢏! ᧣አ Service! Ӥಸ෭ப Spring Cloud Sleuth! ELK! 42 Spring ! Cloud SDK!
45. ங๐‫ۓ‬ຝ຅೴౴—ই֜ᴠྊᵪૄපଫ ๐‫ۓ‬ᛔۖಘ਻! ๐‫ۓ‬᩻෸! ๐‫ۓ‬᯿ᦶ! ԅԧᴠྊᵪૄපଫਖ਼ᔮ ᕹܴं҅Ḓ‫ض‬ᵱᥝਫሿ ๐‫ۓ‬ᛔۖಘ਻҅୮ CPUᨮ᫹᩻ᬦ೰ਧᴇ ꧊ԏ‫҅ݸ‬ඪ೮๐‫ۓ‬ᛔۖ ಘ਻ ᩻෸෸ᳵᦡᗝᬦᳩ‫ݢ‬ᚆ տ੕ᛘஉग़॒ቘᴥल҅ ᕚᑕ᭑Ⴙᤩᘙੱ҅տ‫ے‬ ளᵪૄපଫ҅ಅզ๐‫ۓ‬ ᩻෸෸ᳵᦡᗝጱฎ‫ݳވ‬ ቘԞਖ਼տ୽ߥᵪૄපଫ ๐‫ۓ‬᯿ᦶེහᦡᗝᬦ य़҅Ԟਖ਼տ‫ے‬य़ᵪૄප ଫጱ୽ߥ҅ಅզ๐‫ۓ‬᯿ ᦶེහԞᵱᥝᦡᗝӞӻ ‫ݳ‬ቘጱ᝜ࢱ҅ྲই1ེ ౲ᘏ2ེᒵ APIᗑ‫ى‬ᴴၞ! ๐‫ۓ‬ᴴၞ! ๐‫ۓ‬ᆤෙ! APIᗑ‫ى‬ฎၞᰁጱ‫ف‬ ‫҅ݗ‬ԅԧᴠྊᵪૄප ଫ҅‫ݢ‬զᭌೠᰒ੒‫ق‬ ऒ̵ള‫ݗ‬զ݊IP؉ᴴ ၞ҅ࣁრ१ਖ਼ၞᰁ؉অ ᴴ‫ګ‬ ྯӻ๐‫ݢۓ‬զ‫ۗ׵‬ங๐ ‫ۓ‬໛ຝ๜᫝൉‫׀‬ጱ๐‫ۓ‬ ᴴၞᚆ‫҅ێ‬ਫሿ๐‫ۓ‬ᴴ ၞ̵ള‫ݗ‬ᴴၞᒵ ‫ۗ׵‬ᆤෙ࢏҅๐‫ݢۓ‬զ ਫሿᆤෙ‫ۑ‬ᚆ҅୮Ӟਧ ෸ᳵٖጱ᧗࿢०ᨳሲᬡ ‫ک‬ᴇ꧊‫ސ‬አᆤෙ୏‫҅ى‬ ‫כ‬ಷ‫ݸ‬ᒒ๐‫ۓ‬ 43
46. ங๐‫ۓ‬ຝ຅೴౴—‫૲ړ‬ୗԪ‫ۓ‬CAPਧቘ ࣁӞӻ‫૲ړ‬ୗᔮᕹӾ҅୮ၿ݊᧛ٟ඙֢෸҅‫ݝ‬ᚆ‫ᦤכ‬Ӟᛘ௔̵‫ݢ‬አ௔̵‫܄ړ‬ ਻Კ௔ӣᘏӾጱӷӻ҅‫ݚ‬क़Ӟӻ஠ᶳᤩᇚᇗ • Ӟᛘ௔ҁConsistencyӞᛱ೰୩Ӟᛘ௔҂ғ੒ԭӞӻ೰ਧጱਮಁᒒ๶᧔҅᧛ ඙֢‫ᦤכ‬ᚆड़ᬬࢧ๋ෛጱٟ඙֢හഝ Consistency • ‫ݢ‬አ௔ҁAvailability҂ғᶋඳᵑጱᜓᅩࣁ‫ݳ‬ቘጱ෸ᳵٖᬬࢧ‫ݳ‬ቘጱߥଫ • ‫਻܄ړ‬Კ௔ҁPartition Tolerance҂ғ୮ᗑᕶ‫ڊ‬ሿ‫҅ݸ܄ړ‬ᔮᕹׁᆐᚆड़ᖀ ᖅઆᤈᘳᨱ ࣁ‫૲ړ‬ୗሾहӥ҅ᗑᕶ෫ဩ؉‫ک‬100%‫ݢ‬ᶌ҅ํ‫ݢ‬ᚆ‫ڊ‬ሿඳᵑ҅ࢩྌ‫܄ړ‬ฎӞ ӻ஠ᆐᭌᶱ̶ইຎᭌೠԧCAᘒන୒P҅ᝑ‫ݎ‬ኞ‫܄ړ‬ሿ᨝෸҅ԅԧ‫ᦤכ‬C҅ᔮ ᕹᵱᥝᐬྊٟ‫ྌ҅ف‬෸੪ӨA٫ᑱԧ҅ইຎฎԅԧ‫ᦤכ‬A҅‫ڞ‬տ‫ڊ‬ሿྋଉጱ‫ړ‬ ‫ݢ܄‬զٟ‫ف‬හഝ҅ํඳᵑጱ‫܄ړ‬ӧᚆٟ‫ف‬හഝ҅‫ڞ‬ӨC੪٫ᑱԧ̶ࢩྌ‫૲ړ‬ ୗᔮᕹቘᦞӤӧ‫ݢ‬ᚆᭌೠCAຝ຅҅ᘒᭌೠCP౲ᘏAPຝ຅̶ 44 CP CA Availability AP Partition Tolerance
47. ங๐‫ۓ‬ຝ຅೴౴—‫૲ړ‬ୗԪ‫ۓ‬BASEቘᦞ BASEฎच๜‫ݢ‬አ̵ຨ௔ᇫா̵๋ᕣӞᛘ௔ӣӻᎨ᧍ጱᖽٟ҅໐ஞ௏మฎ‫ܨ‬ ֵ෫ဩ؉‫ک‬୩Ӟᛘ௔҅֕ଫአ‫ݢ‬զ᯻አᭇ‫ݳ‬ጱොୗᬡ‫๋ک‬ᕣӞᛘ௔ • च๜‫ݢ‬አҁBasically Available҂ғ‫૲ړ‬ୗᔮᕹࣁ‫ڊ‬ሿඳᵑ෸҅꧋ᦜഖ० ᮱‫ݢړ‬አ௔҅‫ᦤכܨ‬໐ஞ‫ݢ‬አ • ຨ௔ᇫாҁSoft State҂ғ꧋ᦜᔮᕹਂࣁӾᳵᇫாҁහഝӧӞᛘ҂҅ᘒᧆ Ӿᳵᇫாӧտ୽ߥᔮᕹෆ֛‫ݢ‬አ௔ Basically Available Eventually Consistency BASEቘᦞ • ๋ᕣӞᛘ௔ҁEventually Consistency҂ғᔮᕹӾಅํጱහഝ‫ۅ‬๜ᕪᬦӞ ྦྷ෸ᳵ‫๋҅ݸ‬ᕣᚆड़ᬡ‫ک‬Ӟᛘጱᇫா BASEቘᦞฎ੒CAPጱ୊֐޾ᤑ꧌҅ฎ੒CAPӾAPොໜጱӞӻᤑ꧌҅‫ࣁܨ‬ ᭌೠAPොໜጱఘ‫٭‬ӥ҅ই֜ๅঅጱ๋ᕣᬡ‫ک‬C 45 Soft State
48. ங๐‫ۓ‬ຝ຅೴౴—‫૲ړ‬ୗԪ‫ۓ‬X/Open XA‫ᦓܐ‬ APPଫአᑕଧ! • X/Open‫ࢵܨ‬ᴬᘶፑ൉‫ڊ‬ጱX/Open DistributedTransaction ProcessingҁDTP҂ཛྷࣳ҅‫ܨ‬ଉ᧔ጱ X/Open XA‫҅ᦓܐ‬ᓌᑍXA‫ᦓܐ‬ • DTPཛྷࣳӾ۱‫ތ‬Ӟӻ‫ق‬ੴԪ‫ۓ‬ᓕቘ࢏ TM޾ग़ӻᩒრᓕቘ࢏RM҅TMᨮᨱᓕ ቘ‫ق‬ੴԪ‫ۓ‬ᇫா޾݇Өጱᩒრ҅‫᧣ܐ‬ ᩒრӞ᩸൉ԻӨࢧ჻҅RMᨮᨱᩒრ ඙֢ • XA‫ᦓܐ‬ൈᬿԧTMӨRMԏᳵጱള‫҅ݗ‬ ꧋ᦜࣁ‫ݶ‬Ӟӻ‫૲ړ‬ୗԪ‫ۓ‬Ӿᦢᳯग़ӻ ᩒრ APP1! ଫአᑕଧ! APP2! ଫአᑕଧ! APP3! ଫአᑕଧ! ๜ࣈ ๜ࣈ ๜ࣈ RM1! ᩒრᓕቘ࢏! RM2! ᩒრᓕቘ࢏! RM3! ᩒრᓕቘ࢏! 46 TX TM! Ԫ‫ۓ‬ᓕቘ࢏! XA
49. ங๐‫ۓ‬ຝ຅೴౴—2PCԪ‫ۓ‬ཛྷࣳ ᶼ॓ҁPrepare҂ • 2PCฎXA‫ᦓܐ‬ጱਫሿොୗ҅᭗ଉਫሿࣁහ ഝପᩒრ੶҅ፗള֢አԭᩒრᓕቘ࢏Ӥ TM Ԫ‫ۓ‬ᓕቘ࢏ • ᴤྦྷ1޾ᴤྦྷ2᮷ฎԪ‫ۓ‬ᓕቘ࢏TM᧣አ ੪ᖃҁReady҂ ᶼ॓ҁPrepare҂ ੪ᖃҁReady҂ • XA ‫ᦓܐ‬᭗ᬦྯӻRMጱ๜ࣈԪ‫ۓ‬ᵍᐶ௔๶ ‫قᦤכ‬ੴᵍᐶ҅ଚӬᵱᥝ᭗ᬦԀᤈ۸ᵍᐶ ᕆ‫ڦ‬๶‫૲ړᦤכ‬ୗԪ‫ۓ‬Ӟᛘ௔҅֕ฎԀᤈ ۸ᵍᐶᕆ‫ࣁਂڦ‬Ӟਧጱ௔ᚆᳯ᷌ ൉ԻҁCommit҂ TM Ԫ‫ۓ‬ᓕቘ࢏ • ᝑPrepareᴤྦྷํ୑ଉ҅‫ݸڞ‬ᶎտ᥶‫ݎ‬ abortӾෙ҅ಗᤈCancelࢧ჻Ԫ‫ۓ‬ ૪൉Ի ൉ԻҁCommit҂ ૪൉Ի 47 RM ᩒრᓕቘ࢏1 RM ᩒრᓕቘ࢏2 ᒫӞᴤྦྷ RM ᩒრᓕቘ࢏1 ᒫԫᴤྦྷ RM ᩒრᓕቘ࢏2
50. ங๐‫ۓ‬ຝ຅೴౴—TCCԪ‫ۓ‬ཛྷࣳ try! • TCC‫૲ړ‬ୗԪ‫ۓ‬ཛྷࣳፗള֢አԭ๐‫҅੶ۓ‬ Өବ੶ਂ‫ؙ‬Օᨶ෫‫ݢ҅ى‬զᅎၚᭌೠӱ‫ۓ‬ ᩒრጱᲁਧᔉଶ҅‫ٺ‬੝ᩒრᲁ೮ํ෸ᳵ Ԇӱ‫ۓ‬๐‫!ۓ‬ ᶼ ಗ ᤈ confirm! DB! cancel! • TCC಩ӷᴤྦྷ‫ړ‬౮ԧӷӻᇿᒈጱৼᴤྦྷ҅ ࣁᒫԫᴤྦྷಗᤈᩒრӱ‫ۓ‬ᲁਧ෸҅෬ӧտ ᴥलٌ՜Ԫ‫ࣁۓ‬ᒫӞᴤྦྷ੒ԭፘ‫ݶ‬ᩒრጱ ᖀᖅֵአ҅Ԟӧտ୽ߥ๜Ԫ‫ۓ‬ᒫԫᴤྦྷጱ ྋᏟಗᤈ try! Ԫ‫ۓ‬ᓕቘ࢏! Ԫ‫ۓ‬෭ப! 48 Ꮯ ᦊ ಗ ᤈ confirm! cancel! ՗! ӱ! ‫!ۓ‬ ๐! ‫!ۓ‬ A! ՗! ӱ! ‫!ۓ‬ ๐! ‫!ۓ‬ B!
51. ங๐‫ۓ‬ຝ຅೴౴—ṛ௔ᚆ‫ق‬ੴԪ‫ۓ‬GTS Fescar • GTSԞฎचԭӷᴤྦྷ൉Իጱቘᦞਫሿጱ‫૲ړ‬ୗԪ ‫ۓ‬໛ຝ • ٌӾGTS RMአԭഔ഍Insert/Delete/ • UpdateጱSQL඙֢҅ᰒ੒୮‫ڹ‬ጱ඙֢҅տ຅᭜ ‫ڊ‬ፘଫጱSQLັᧃ᧍‫҅ݙ‬ਖ਼୮‫ڹ‬SQL᧗࿢ᥝ‫ץ‬ද ጱහഝ‫ض‬՗හഝପӾ឴‫ࣁਂכ҅ݐ‬෭பUndo෭ பӾ҅୮ਫᴬጱSQLಗᤈਠླզ‫҅ݸ‬տེٚັᧃ ‫ץ‬ද‫ݸ‬ጱහഝ҅ਂࣁRedo෭பӾ ӱ‫ۓ‬ଫአ! GTS Client! GTS! Server! Ԫ‫!࢏᧣ܐۓ‬ • ୮‫ڊ‬ሿԪ‫ࢧۓ‬჻෸҅Ḓ‫ض‬੒ྲ୮‫ڹ‬හഝପӾහഝ ꧊Өԏ‫ਂכڹ‬ጱRedoӾᤩ‫ץ‬දጱ꧊ฎ‫ވ‬Ӟᛘ҅ ᝑӞᛘ‫ڞ‬໑ഝUndo෭பኞ౮ࢧ჻አጱUndo SQLଚಗᤈҔইຎӧӞᛘ҅᧔กฎᧆ‫૲ړ‬ୗԪ‫ۓ‬ ࣁᒫӞᴤྦྷ‫ץ‬දԧහഝԏ‫ٌᤩ݈҅ݸ‬՜ᕚᑕ‫ץ‬ද ԧ҅ྌ෸ኧGTS Server‫҅ᦄޞڊݎ‬୚‫ف‬Ոૡଗ ᶼ • ෫ᵱ୏‫ݎ‬Ոާਫሿӱ‫ۓ‬ጱྋ‫ݻ‬ᤑؑ౲ࢧ჻҅‫ٺ‬੝ ੒ӱ‫ۓ‬᭦ᬋጱ‫׍ف‬ 49 ӱ‫ۓ‬ଫአ! ӱ‫ۓ‬ଫአ! ӱ‫ۓ‬ଫአ! GTS Client! GTS Client! GTS Client!
52. ங๐‫ۓ‬ຝ຅೴౴—‫૲ړ‬ୗԪ‫ۓ‬ၾ௳ 1 ‫ݎ‬ᭆ܎ၾ௳ ๜ ࣈ Ԫ ‫!ۓ‬ 3 ಗᤈ๜ࣈԪ‫ۓ‬ • • MQ! ๐‫!࢏ۓ‬ 4 Commit Or Rollback 6 ༄ັ๜ࣈԪ‫ۓ‬ጱᇫா • • MQ! ‫ݎ‬ᭆො! 2 ܎ၾ௳‫ݎ‬ᭆ౮‫ۑ‬ Commit ಭ᭓ၾ௳ MQ! ᦈᴅො! Rollback ‫ڢ‬ၾ௳ӧಭ᭓ 8ಗᤈ๜ࣈԪ‫ۓ‬ ๜ ࣈ Ԫ ‫!ۓ‬ 5 ๚ත‫ک‬4ጱᏟᦊ෸҅ࢧັԪ‫ۓ‬ᇫா Ԫ‫ۓ‬ၾ௳๜ᨶฎचԭXA‫ᦓܐ‬ጱ2PCӷᴤྦྷԪ‫ۓ‬ਫሿ! ܎ၾ௳ғฮӧᚆಭ᭓ጱၾ௳҅‫ݎ‬ᭆො૪ᕪਖ਼ၾ௳౮‫ݎۑ‬ᭆ‫ک‬ԧ MQ ๐‫ۓ‬ᒒ҅֕ฎ๐‫ۓ‬ᒒ๚ත‫ک‬ኞԾᘏ੒ᧆၾ௳ጱԫེᏟᦊ҅ྌ෸ ᧆၾ௳ᤩຽᦕ౮“ฮӧᚆಭ᭓”ᇫா ၾ௳ࢧັғኧԭᗑᕶᳬෙ̵ኞԾᘏଫአ᯿‫ސ‬ᒵܻࢩ҅੕ᛘ຤๵Ԫ‫ۓ‬ၾ௳ጱԫེᏟᦊӶ०҅MQ ๐‫ۓ‬ᒒ᭗ᬦಚൈ‫ݎ‬ሿ຤๵ၾ௳ᳩ๗॒ ԭ“܎ၾ௳”෸҅ᵱᥝԆۖ‫ݻ‬ၾ௳ኞԾᘏᧃᳯᧆၾ௳ጱ๋ᕣᇫாҁCommit ౲ฎ Rollback҂! ᝑᒫԫӻԪ‫ۓ‬ಗᤈ०ᨳ҅‫ݢ‬᭗ᬦࢧಲၾ௳ጱොୗ᭗ᎣMQ‫ݎ‬ᭆො҅ᬰᤈࢧ჻඙֢! 50
53. ங๐‫ۓ‬ຝ຅೴౴—‫૲ړ‬ୗԪ‫ۓ‬ၾ௳‫ݻ݌‬Ꮯᦊ 1 ‫ݎ‬ᭆၾ௳ 2 ᦈᴅၾ௳ MQ! ๐‫!࢏ۓ‬ MQ! ‫ݎ‬ᭆො! 4 ᦈᴅࢧಲᏟᦊ ත‫ک‬ၾ௳ • • • MQ! ᦈᴅො! 3 ࢧಲᏟᦊත‫ک‬ၾ௳ ᭗ᬦ‫ݻ݌‬ၾ௳Ꮯᦊ๢‫๋҅ګ‬ᕣ‫ᦤכ‬ၾ௳փ᭓౮‫ۑ‬ ᝑํᗑᕶᳯ᷌҅ၾ௳Ӷ०҅੕ᛘᦈᴅොဌํၾᩇ‫ک‬ၾ௳҅‫ᦈڞ‬ᴅොࣁӞਧ෸ᳵٖဌํࢧಲᏟᦊත‫ک‬ၾ௳҅ྌ෸‫ݎ‬ ᭆොᵱᥝེٚ‫ݎ‬ᭆၾ௳ ኧԭํၾ௳᯿॔‫ݎ‬ᭆ๢‫҅ګ‬ಅզᦈᴅොᵱᥝ؉‫ک‬଍ᒵ௔҅ᴠྊၾ௳᯿॔ၾᩇ‫҅ݸ‬੕ᛘහഝ‫ڊ‬ᳯ᷌! 51
54. ங๐‫ۓ‬ଚӧฎᱷ୨ ๐‫ݎۓ‬ሿ ๐‫ۓ‬᭗‫מ‬ ๐‫ۓ‬ፊഴ ๐‫ဳۓ‬ٙ ๐‫ۓ‬᭄᪵ ๐‫ۓ‬௔ᚆ ‫૲ړ‬ୗԪ‫ۓ‬ ᨮ᫹࣐ᤍ ๐‫ۓ‬ᆤෙ ๐‫ۓ‬ᴳᕆ 52 ๐‫ۓ‬ၥᦶ ๐‫ۓ‬ਞ‫ق‬ ๐‫ۓ‬ᴴၞ
55. ਫෞங๐‫֦ۓ‬ᵱᥝጱ௏ᘍ N kc为什么要实施微服务 N 现阶段kcu司适合实施微服务吗 N 组织架构做好调整了吗 N 是否有微服务相v技术r备 N 实施微服务的好处是否大于成本 53
56. ਫ᪢ங๐‫ۓ‬ຝ຅ 54
57. ங๐‫ۓ‬ೆ‫ړ‬ ᕟᕢ ຝ຅! • ᕟᕢຝ຅᥯ଶ҅᧣ෆՈާᕟᕢຝ຅҅Өӱ‫ۓ‬ᬟኴፘ‫܃‬ᯈ • ӱ‫ۓ‬ຝ຅᥯ଶ҅ᦩ‫ڦ‬ӱ‫ۓ‬ᬟኴ҅᭗ᬦӱ‫ۓ‬ᬟኴ‫ړښ‬๐‫ۓ‬ • ᔮᕹຝ຅᥯ଶ҅चԭ‫ݢ‬ᶌ௔̵‫ݢ‬ಘ઀௔̵௔ᚆᬰᤈೆ‫ړ‬ ᔮᕹ ຝ຅! 55 ӱ‫ۓ‬ ຝ຅!
58. ங๐‫ۓ‬ೆ‫—ړ‬ᕟᕢຝ຅ CTO! ‫ڹ‬ᒒࢫᴚ! ‫ݸ‬ᒒࢫᴚ! ၥᦶࢫᴚ! ᬩᖌࢫᴚ! DBAࢫᴚ! ᶱፓࢫᴚ1! ‫ڹ‬ᒒࢫᴚ1! ‫ݸ‬ᒒࢫᴚ1! ၥᦶࢫᴚ1! ᬩᖌࢫᴚ1! DBAࢫᴚ1! ᶱፓࢫᴚ2! ‫ڹ‬ᒒࢫᴚ2! ‫ݸ‬ᒒࢫᴚ2! ၥᦶࢫᴚ2! ᬩᖌࢫᴚ2! DBAࢫᴚ2! ᶱፓࢫᴚ3! ‫ڹ‬ᒒࢫᴚ3! ‫ݸ‬ᒒࢫᴚ3! ၥᦶࢫᴚ3! ᬩᖌࢫᴚ3! DBAࢫᴚ3! ᶱፓࢫᴚ4! ‫ڹ‬ᒒࢫᴚ4! ‫ݸ‬ᒒࢫᴚ4! ၥᦶࢫᴚ4! ᬩᖌࢫᴚ4! DBAࢫᴚ4! • ኧᘳᚆࣳᕟᕢຝ຅‫ݻ‬Ꭵᴣࣳᕟᕢຝ຅᧣ෆ 56
59. ங๐‫ۓ‬ೆ‫—ړ‬ӱ‫ۓ‬ᥤ᥯ ࠟߝ! ࠟߝ! ๐‫!ۓ‬ ପਂ! ପਂ! ๐‫!ۓ‬ հ໒! հ໒! ๐‫!ۓ‬ ᦈ‫!ܔ‬ ᦈ‫!ܔ‬ ๐‫!ۓ‬ ӧᥝ՗හഝପ୏তୌཛྷ ‫ܔ‬๐‫ܔۓ‬ӱ‫ۓ‬ᶾऒ ᦩ‫ڦ‬໐ஞӱ‫ۓ‬๐‫ۓ‬ 57
60. ங๐‫ۓ‬ೆ‫—ړ‬ங๐‫ۓ‬ӨDDDᶾऒḝۖᦡᦇ ࠟߝऒ! ᦈ‫ܔ‬ऒ ᇔၞऒ ՙ‫ؙ‬ऒ DDDӱ‫ۓ‬ຝ຅ APP! PC! ള‫੶ف‬ ࠟߝ! ଫአ๐‫!ۓ‬ ᦈ‫!ܔ‬ ଫአ๐‫!ۓ‬ ଫአ ๐‫੶ۓ‬ ՙ‫!ؙ‬ ଫአ๐‫!ۓ‬ ᇔၞ! ଫአ๐‫!ۓ‬ ࠟߝ! ᶾऒ๐‫!ۓ‬ ᦈ‫!ܔ‬ ᶾऒ๐‫!ۓ‬ ՙ‫!ؙ‬ ᶾऒ๐‫!ۓ‬ ᇔၞ! ᶾऒ๐‫!ۓ‬ ෭ப! Ԫ‫!ۓ‬ ፊഴ! ᯈᗝ! ᔮᕹຝ຅ ᶾऒ ๐‫੶ۓ‬ ‫ق‬᱾᪠! ᭄᪵! ங๐‫!ۓ‬ လቘᕟկ! ‫૲ړ‬ୗ! ፊഴ! ‫૲ړ‬ୗ! හഝପӾᳵկ! ‫૲ړ‬ୗ! ᯈᗝӾஞ! ‫૲ړ‬ୗ! ձ‫᧣ۓ‬ଶ! चᏐ ᦡෞ੶ ದ๞ຝ຅ 58
61. ங๐‫ۓ‬ೆ‫—ړ‬DDD౴ኼᦡᦇᴴኴӤӥ෈ᥤࢶ&ฉ੘ ᦈ‫ڹࠓܔ‬ Ӥӥ෈! ps! ps! ᦈ‫ڹࠓܔ‬ Ӥӥ෈ ᦈ‫ݸࠓܔ‬ Ӥӥ෈ ᦈ‫ݸࠓܔ‬ Ӥӥ෈! ps! ᦈ‫ܔ‬આᕅ Ӥӥ෈! ᦈ‫ܔ‬આᕅ Ӥӥ෈ ACL! OHS/PL! ᇔၞ! Ӥӥ෈! 59 OHS/PL! ՙ‫!ؙ‬ Ӥӥ෈!
62. ங๐‫ۓ‬ᵅᴟ—ೆ‫ړ‬ᬦᕡ ᕡᔉଶ๐‫ۓ‬ ᔋᔉଶ๐‫ۓ‬ • • • nӻ๐‫ۓ‬ጱ॔๥ଶฎn x (n-1)/2 ᔋᔉଶ๐‫҅ۓ‬๐‫ۓ‬ᳵ‫ى‬ᔮᓌ‫ܔ‬ ᕡᔉଶ๐‫ܔ҅ۓ‬ӻ๐‫ۓ‬ᶋଉੜ҅‫ܔ‬ӻ๐‫ۓ‬ጱ॔๥ଶᴳ֗ԧ҅֕ෆӻᔮᕹ๐‫ۓ‬ᳵጱ॔๥ଶ‫ܩ‬Ӥ‫܋‬ᶋଉय़ 60
63. ங๐‫ۓ‬ᵅᴟ—๐‫᧣ۓ‬አ᱾ॡᳩ 50ms 50ms • • • 50ms 50ms 50ms ‫ᦡ؃‬๐‫ۓ‬ᳵ᧣አӞེᘙ෸50ms ᒫӞ๵๐‫᧣ۓ‬አ᱾᪠ᘙ෸100ms ᒫԫ๵๐‫᧣ۓ‬አ᱾᪠ᘙ෸200ms҅๐‫ۓ‬᱾᪠ॡᳩ҅੕ᛘਠ౮Ӟེ᧗࿢ᘙ෸ᬦᳩ 61 50ms
64. ங๐‫ۓ‬ଚᤈզ݊୑ྍ᧣አ 30ms! 10ms! 20ms! Ԁᤈ᧣አᘙ෸60ms 20ms! 10ms! 30ms! ଚᤈ᧣አᘙ෸30ms • • • Ԁᤈ᧣አӞེᘙ෸60ms ইຎ๐‫᧣ۓ‬አӧ‫ى‬ஞള‫ݗ‬ᬬࢧ꧊҅‫ݢ‬զ᯻አ୑ྍ᧣አ ইຎ๐‫᧣ۓ‬አׁᩢള‫ݗ‬ᬬࢧ꧊҅ଚӬग़ӻ๐‫ۓ‬ԏᳵဌํׁᩢ҅‫ݢ‬զ᯻አଚᤈ᧣አ‫ٺ‬੝ᘙ෸ 62
65. ங๐‫๋֯ۓ‬ਫ᪢ ๐‫ۓ‬ຂᘠ‫ڞܻݳ‬ ӱ‫ۓ‬ḝܻۖ‫ڞ‬ • • • • ᦩ‫ڦ‬໐ஞӱ‫ۓ‬ऒ҅୵౮चᏐӱ‫ۓ‬ᚆ‫ێ‬ ໑ഝӱ‫ۓ‬ਧ̵֖᝜ࢱ̵ᬟኴᬰᤈ๐‫ۓ‬ ጱ‫ړښ‬ Ḓ‫ဳىض‬๐‫ۓ‬ጱӱ‫ۓ‬᝜ࢱ҅ᘒӧฎ๐ ‫ۓ‬ጱහᰁ̵ᔉଶ • • • 微服务 实践 ๐‫ڞܻ੶ړۓ‬ • • • • ‫ړښ‬चᏐ̵ᘸ‫̵ݳ‬ၞᑕ๐‫ۓ‬ चᏐ๐‫ۓ‬ᩂᬪӱ‫ۓ‬ਫ֛҅൉‫׀‬ӱ‫ۓ‬ጱच Ꮠᚆ‫ێ‬ ᘸ‫ݳ‬๐‫ۓ‬ᘸ‫ݳ‬च๜ӱ‫࣋ۓ‬ว҅ჿ᪃ṛӞ ੶ӱ‫࣋ۓ‬วଚ‫॔ݢ‬አ ၞᑕ๐‫ۓ‬ᶎ‫॔ݻ‬๥ӱ‫ۓ‬ၞᑕਫሿ҅᭗ᬦ ḝۖग़ӻᘸ‫ݳ‬/चᏐ๐‫ۓ‬ਫሿӞӻਠෆ ጱӱ‫ۓ‬ၞᑕ ๐‫ۓ‬ᘳᨱ‫ܔ‬Ӟ҅Ӟӻ๐‫ۓ‬ᘸᆌࣁᇙ ਧӱ‫ۓ‬ጱํᴴ᝜ࢱٖ҅ํۗԭභഠ ୏‫޾ݎ‬ᇿᒈ‫૲ݎ‬ ‫ړ܄‬໐ஞӱ‫ۓ‬๐‫޾ۓ‬ᶋԆ໐ஞӱ‫ۓ‬ ๐‫ۓ‬ ‫ړ܄‬ᑞਧ๐‫޾ۓ‬ฃ‫ݒ‬๐‫ۓ‬ ྯӻ๐‫ݝۓ‬ᚆᦢᳯᛔ૩ጱහഝ ๐‫ۓ‬ᇿᒈ᮱ᗟܻ‫ڞ‬ • • • • ّ਻௔ܻ‫ڞ‬ • • ള‫ॶݗ‬ᕅ‫ض‬ᤈ҅൉‫๋׀‬ෛࣁᕚ๐‫෈ۓ‬໩ ๐‫ۓ‬ᇇ๜ᓕቘ҅‫਻ّڹݻᦤכ‬ 63 ๐‫ۓ‬ᇿᒈ᮱ᗟ҅ᚆड़ᇿᒈ‫૲ݎ‬౲‫ݐ‬ ၾ‫૲ݎ‬ ๐‫ݢۓ‬࿜ଘಘ઀҅ଚඪ೮‫ܔ‬ᇿಘ઀ ਫሿ೮ᖅᵞ౮޾ᛔۖ‫૲ݎ‬ ਫሿ๐‫ۓ‬ጱದ๞޾ӱ‫ۓ‬ፊഴ
66. ங๐‫ۓ‬चᏐӾ‫ݣ‬ Venus֛ᔮ ๐‫ۓ‬໛ຝ • Venus֛ᔮ—๐‫ۓ‬໛ຝғ൉‫׀‬๐‫ဳۓ‬̵ٙ‫ݎ‬ሿ̵ လቘ̵‫ق‬᱾᪠᪙̵᪵ፊഴ̵ਞ‫ق‬ദ๦ᓕቘ • Venus֛ᔮ—चᏐӾᳵկғ൉‫૲ړ׀‬ୗᯈᗝᓕ ቘ̵‫૲ړ‬ୗձ‫᧣ۓ‬ଶ̵ᕹӞ༄ᔱଘ‫̵ݣ‬ၾ௳ᴚ ‫̵ڜ‬OSP๐‫ۓ‬ള‫෈ݗ‬໩ᛔۖኞ౮ᔮᕹ̵ᕹӞහഝ ๐‫ۓ‬ᓕቘଘ‫ݣ‬ RPC! OSP! APIᗑ‫!ى‬ Janus! ๐‫ۓ‬ਞ‫ق‬ᓕቘ! Salus! ‫ق‬᱾᪠᪙᪵! Mercury! ဳٙӾஞ! ZK! ๐‫ۓ‬လቘ! Service-center! चᏐӾᳵկ 64 ᯈᗝӾஞ! CfgCenter! ձ‫᧣ۓ‬ଶ! Saturn! ᕹӞ༄ᔱଘ‫!ݣ‬ Pallas! ၾ௳ᴚ‫!ڜ‬ VMS! Ӿ।෈໩ᔮᕹ! DocCenter! හഝ๐‫ۓ‬ଘ‫!ݣ‬ Asgard!
67. OSP๐‫ۓ‬۸ᬱᑕ᧣አ๢‫ګ‬ ॶᕅ۸ग़᧍᥺! ๐‫ۓ‬ള‫!ݗ‬ IDL! ๐‫ۓ‬SDK! osp-client osp-proxy ᗑᕶ᭗ᦔ! ၞᰁഴ‫!ګ‬ හഝଧ‫ڜ‬۸! ᗑᕶ᭗ᦔ! Request! Request! Response! Response! ᳩ᱾ള! Java: ᳩ᱾ള҅PHP: Ꭸ᱾ള! 65 አಁդᎱ! osp-container ᯈᗝ̵ፊഴ! හഝଧ‫ڜ‬۸! ᗑᕶ᭗ᦔ! ᕹӞ๐‫!ۓ‬ လቘଘ‫!ݣ‬ ๐‫ۓ‬ਫሿ! ๐‫ۓ‬လቘ! ፊഴ! ਮಁᒒ਻Კ! හഝଧ‫ڜ‬۸! ṛ‫ݢ‬ᶌ௔! चᏐᦡෞ! ᯈᗝ̵ፊഴ! ṛ௔ᚆ‫ݢ‬ಘ઀! RPC໛ຝ! ໛ຝդᎱ!
68. OSPṛ௔ᚆ๐‫ۓ‬۸໛ຝս۠ ṛ௔ᚆ! ṛ‫ݢ‬ಘ઀! • Thrift Netty! • • QPS! • • • • • TCP ! 66 Load Balancer!
69. OSP๐‫ۓ‬۸ຝ຅ ๐‫ۓ‬လቘӾஞ! Service Center! ᯈᗝӾஞZK! ๐‫ݎۓ‬ሿ • ਮಁᒒӨProxy᮱ᗟࣁ‫ݶ‬Ӟ‫ݣ‬ ๢࢏ጱӧ‫ݶ‬ᬰᑕ Javaଫአ! ๐‫ۓ‬A! SDK! • ᭗ᬦ๐‫ۓ‬လቘӾஞᓕቘਞ ‫̵ق‬๐‫ۓ‬᪠ኧ̵๐‫ۓ‬ᆤෙᒵ ᳩᬳള ๐‫᧣ۓ‬አ PHPଫአ! ๐‫ۓ‬B! SDK! ๐‫ဳۓ‬ٙ ๐‫ۓ‬A! OSP Proxy! Ꭸᬳള ๐‫ۓ‬B! ፊഴ෭ப 67 ᳩᬳള ፊഴಸᦄ! Mercury! ፊഴ෭ப
70. OSP๐‫ۓ‬۸ຝ຅௔ᚆܴၥ—ܴၥ݇හ ᤩܴᇔቘ๢ Server Type! CPU! Memory! Network! OS! osp-proxy! 24core /2.60GHz! 32G! 1000Mb! CentOS release 7.1! 612G! 612G! osp-service! 24core /2.60GHz! 32G! 1000Mb! CentOS release 7.1! CPU! Memory! Network! OS! 1000Mb! CentOS release 7.1! DISKҁᶋSSD҂! ܴ‫ێ‬๢ Type! jmeterܴၥ๢! 2core /2.60GHz! 15G! 68 DISKҁᶋSSD҂! 197G!
71. OSP๐‫ۓ‬۸ຝ຅௔ᚆܴၥ—REST/OSP/PHP੒ྲ ࢶ 69
72. OSP๐‫ۓ‬۸ຝ຅௔ᚆܴၥ—REST/OSP/PHP੒ྲ ࢶ 70
73. OSP๐‫ۓ‬۸ຝ຅௔ᚆܴၥ—REST/OSP/PHP੒ྲ ࢶ 71
74. OSP๐‫ۓ‬۸ຝ຅௔ᚆܴၥ—REST/OSP/PHP੒ྲ ࢶ 72
75. ๐‫ۓ‬ਞ‫ق‬ᳯ᷌‫ړ‬ຉ 1 2 3 ๐‫ۓ‬ᬦଶ୏න භఽහഝ᥃ॷ ݇හᓫද ‫ݪل‬භఽጱ๐‫ݢۓ‬զ෫ᴴ ‫ګ‬ጱᤩ᧣አ ๐‫᧣ۓ‬አ᭗ᬦก෈փᬌ҅ භఽහഝӧड़ਞ‫ق‬ 73 փᬌጱٖ਻‫ݢ‬ᚆࣁӾ᭔ᤩ ‫ץ‬ද҅݇හӧӞᛘ
76. Salus๐‫ۓ‬ਞ‫ق‬ᓕቘՕᕨ Salues • ӫဳԭ‫ݸ‬ᒒ๐‫ۓ‬ጱਞ‫ق‬ᓕቘ҅ԅ๐‫ۓ‬ ള‫ݗ‬ԏᳵ᧣አ൉‫׀‬໛ຝᕆጱദ๦޾ᦊ ᦤ ਞ‫ق‬᭗᭲ client! • ᶎ‫ݻ‬osp޾RESTful୵ୗጱ๐‫҅ۓ‬൉ ‫׀‬๐‫ۓ‬ਞ‫ق‬ᓕቘҁᦊᦤ̵ᰄ๦̵ᴠᓫ ද҂ጱಋྦྷ service! ᶋਞ‫ق‬᭗᭲ ๐‫᧣ۓ‬አᘏ 74 ๐‫ۓ‬൉‫׀‬ᘏ
77. Salus๐‫ۓ‬ਞ‫ق‬ᓕቘຝ຅ • ᓕቘާࣁഴ‫ݣګ‬ᯈᗝᒽኼ҅ᒽ ኼ೮ԋ۸‫ک‬MySQLහഝପ • ᒽኼ‫ݒ‬ๅᕪᬦਭ໐‫҅ݸ‬᭗ᬦ ZooKeeper᭗Ꭳ๐‫ۓ‬ᒒ޾ਮಁ ᒒᒽኼ‫ݎ‬ኞ‫ݒ‬۸ • ๐‫ۓ‬ᒒ޾ਮಁᒒ՗salusᔮᕹ ጱhttpള‫ݗ‬ӥ᫹ᒽኼ 75
78. ‫ق‬᱾᪠᭄᪵Mercury‫ۑ‬ᚆՕᕨ 监控告警 指标统计 调用链跟踪 ü监控大盘快速展现系统问题 ü域Q主机Q服务A2I级别指标展示 ü调用链检索O通过U务v键字P ü秒级实时告警第一时间报告 ü每秒请求数 ü慢调用查询 ü响应时间 ü失败调用查询O4LLQ5LLP ü请求失败率(4LL/5LL/EHF faiBed ü调用链详情展示 criIicaB iHHJeH ü分钟级y实时告警周期性检测指标规 则 üa告警事d快速定h根源问题 ü灵活方n的多级告警策略定义 ü异常发生率 ü43.性能指标 ü拓扑m赖v系和性能指标 ü2igeEDW央告警平台无缝集成 76
79. ‫ق‬᱾᪠᭄᪵Mercury໐ஞհ꧊ I5运维Q监控W心人员 应用开发人员 应用管理人员 • 快速故障告警和问题定h • 定h线S服务性能瓶颈 • t方h把握应用整i拓扑结构 • 把握应用性能和容量评g • 持续e化b码和43. • 定ht网应用瓶颈 • 提l可追溯的性能数据 • 帮助快速解x线S问题 • 帮助e化v键U务 77
80. ‫ق‬᱾᪠᭄᪵Mercuryຝ຅ 数据源 接s层 数据存r层 FBJCe AgeDI AafAa 集 群 数据服务层 数据消费层 y实时监控 4FarA集 群 Web A22 实时计算层 OpenTSDB (aIa 4ervice FBJCe 5E)4 (aHhbEard Elas-c Search 实时监控 其它应用 FBJCe 5EHB HBase 78
81. ໐ஞ᧣አ᱾လቘ • ໐ஞӱ‫ۓ‬ၞᑕୌཛྷ • ୩୧ׁᩢ҅ၞᰁᄋ෎ཛྷࣳ • ၞᰁཛྷࣳ‫ݒ‬۸ጱܲ‫ྲݥ‬੒ • ၞᰁཛྷࣳ‫ݒ‬۸ጱਫ෸᭗Ꭳ • ᩻෸ᦡᗝလቘ • ඳᵑ‫ړ‬ຉਧ֖ᬀۗ • ਻ᰁᥢ‫ښ‬ᬀۗ 79
82. ෭பፊഴ‫ᦄޞ‬ᔮᕹDragonflyຝ຅ • ᔱ୚ᶼ‫ڠ‬ୌ҅൉‫ڠڹ‬ୌᔱ୚҅ଚԅӧ‫ݶ‬ଫአ ጱᔱ୚೰ਧ‫ݳ‬ᭇጱ‫ړ‬ᇆහᰁ • ๊ᤑᔱ୚᭬҅‫ک‬य़‫׏‬෭பी‫ے‬౲ᘏܴၥ̵୏ ‫ݎ‬debugᒵ҅൉‫ڹ‬ᥢ‫ښ‬অጱᔱ୚‫ړ‬ᇆ‫ڊ‬ሿӧ ᪃҅᭗ᬦ‫ڠ‬ୌ๊ᤑᔱ୚҅‫ݸ‬ᖅጱ෭ப᮷ٟࣁ ᬯ᯾҅ັᧃ෭ப෸᭗ᬦӞਧጱᥢ‫ڞ‬೰ਧ‫ݶ‬෸ ֵአՔॠጱ“ྋᭌ”ᔱ୚޾๊ᤑᔱ୚ • Force Merge҅‫ٹ‬ลಗᤈਧ෸ձ‫҅ۓ‬੒‫ڹ‬Ӟ ॠጱᔱ୚҅ೲᆙ‫ړ‬ᇆय़ੜಗᤈForce Merge ᜓ፜ञٖਂ҅൉‫ᧃັ܋‬᭛ଶ҅‫ݚ‬क़ኧԭ Force Merge඙֢տय़ᰁ᧛ٟᏺፏ҅ᥝ‫ᦤכ‬ ࣁSSD๐‫࢏ۓ‬Ӥಗᤈ • ෭ப୭໩҅ᰒ੒7ॠզ‫ڹ‬ጱ෭பᬰᤈ୭໩ • ‫ٯ‬ᅾ‫ړ‬ᐶ҅ᅾහഝනࣁSSDᏝፏ҅‫ٯ‬හഝ୭ ໩ࣁฦ᭗Ꮭፏ 80
83. ෭பፊഴ‫ᦄޞ‬ᔮᕹDragonfly‫ٯ‬ᅾ෭பහഝ‫ړ‬ᐶ • Ḓ‫ᜓࣁ҅ض‬ᅩጱᯈᗝ෈կӾ᭗ᬦnode.tagં௔ֵአӧ ‫ݶ‬ጱຽᓋ‫ݢ‬զ‫ړ܄‬ӧ‫ݶ‬ᔄࣳጱ๐‫࢏ۓ‬ҁইᏝկᔄ ࣳ҅๢ຬᒵ҂ • ᭗ᬦindex.routing.allocation.include/excludeጱᔱ୚ ᦡᗝ‫ݢ‬զ೰ਧᔱ୚‫ړ‬ᇆ‫ݝ‬ᚆ‫ړ‬ᯈࣁ຤ᐿtagጱ๐‫࢏ۓ‬ Ӥ • ‫ڥ‬አզӤොဩ҅౯ժࣁ‫ڠ‬ୌጱෛጱᔱ୚෸҅೰ਧ‫ݝ‬ ‫ړ‬ᯈࣁᅾහഝ๐‫࢏ۓ‬ҁSSD๐‫࢏ۓ‬҂Ӥ̶ֵ೜ํ୩ ‫۝‬ᏺፏIO޾CPU௔ᚆጱᅾහഝ๐‫࢏ۓ‬ಥളԧෛ෭ப ጱٟ‫ᧃັ޾ف‬ • ᦡᗝज़ᳵਧ෸ձ‫҅ۓ‬ਖ਼Nॠ‫ڹ‬ጱᔱ୚‫ץ‬දԅ‫ݝ‬ᚆ‫ړ‬ᯈ ࣁ‫ٯ‬හഝ๐‫࢏ۓ‬ҁHDD๐‫࢏ۓ‬҂Ӥ̶ֵᦢᳯ᷇ሲᴳ ֗ጱᔱ୚relocate‫ک‬य़ᏺፏ਻ᰁጱ๐‫࢏ۓ‬Ӿ‫ਂכ‬ 81
84. ங๐‫ۓ‬ग़IDC᮱ᗟຝ຅ IDC1 • • • դቘ੶ኧ๜ࣈդቘproxy޾ᵞӾୗӾ। ᵞᗭproxyᕟ౮҅๜ࣈդቘզᇿᒈᬰᑕ ොୗ᮱ᗟࣁྯӞ‫᧣ݣ‬አᘏ๐‫࢏ۓ‬Ӥ҅‫ݝ‬ ԅ๜๢᧣አᘏ๐‫ۓ‬ҔᵞӾୗӾ।ᵞᗭࣁ ྯӻ๢಄᮱ᗟӞӻ҅ኧLVS൉‫׀‬ᨮ᫹࣐ ᤍ҅ԅ๜ࣈդቘ൉‫਻׀‬Კᚆ‫ࣁ̶ێ‬๜ࣈ դቘ‫ݎ‬ኞඳᵑ෸҅᧣አො‫ڔ‬ഘ‫ֵک‬አᵞ ӾୗӾ।ᵞᗭਠ౮๐‫᧣ۓ‬አҔ IDC2 client! Proxy! դቘ੶՗ဳٙӾஞ឴‫ݱݐ‬๢಄ጱ๐‫ۓ‬ਫ ֺ‫҅௳מ‬ଚս‫ض‬ᭌೠֵአ๜๢಄๐‫ۓ‬ਫ ֺҁ‫ݢ‬ᯈᗝ҂҅ࣁ๜๢಄෫‫ݢ‬አਫֺ෸ ᭌೠֵአٌ՜๢಄ਫ̶ֺդቘ੶՗ᯈᗝ Ӿஞ឴‫᧣ݐ‬አොጱᯈᗝ‫҅௳מ‬ଚ‫כ‬೮ਫ ෸ๅෛҔ Client! Client! Proxy! Proxy! Service! Service! zk! zk! CfgCenter ᯈᗝӾஞᵞӾ᮱ᗟࣁӞӻ๢಄ٖ҅ Mercury‫ق‬᱾᪠ፊഴᵞӾ᮱ᗟࣁӞӻ๢ ಄̶ٖ Mercury! 82 client! Proxy!
85. ங๐‫ۓ‬ຝ຅ࣁय़ࣳኪࠟय़‫׏‬ ၚۖӾጱਫ᪢ 83
86. य़‫׏‬໐ஞᔮᕹreviewො‫ݻ‬ ᭌᨻᕚreview ‫ڹ‬ᒒ ଫአ ӥ‫ܔ‬ᕚreview APP! H5! ੜᑕଧ! ᭌᨻᕚᘸ‫ݳ‬๐‫ۓ‬ ᲀࠓԆ᷌ ‫ڜ‬ᤒ! ӫ࣋/ӫ ᷌‫ڜ‬ᤒ! ࠟߝ‫ڜ‬ᤒ! ࠟߝᧇఘ! ᨻᇔ᫣/! ᕮᓒ! ᦈ‫!ܔ‬ ӻ௔۸വ គ! ൤ᔱ! հ໒! ᲀࠓପਂ! WAP! ඪ՞ᕚᘸ‫ݳ‬๐‫ۓ‬ තᱷ‫!ݣ‬ ඪ՞! አಁᕚᘸ‫ݳ‬๐‫ۓ‬ አಁ/! තᡐ! ጭ୯ദ๦ /ဳٙ! ளଫአ! ᬩ០ᕚᘸ‫ݳ‬๐‫ۓ‬ ӫ᷌! ၚۖᘸ‫!ݳ‬ ӻ௔۸! ૲ੴᬩ០! PAYଘ‫!ݣ‬ ӥ‫ܔ‬ᕚᔮᕹ चᏐᔮᕹ ࠟߝᩒා! ᬩ០ᕚreview ӱ‫ۓ‬ᘸ‫ݳ‬ හഝ/ӱ‫ۓ‬ᘸ‫ݳ‬๐‫ۓ‬ ࠟߝᘸ‫!ݳ‬ አಁᕚreview PC! ӥ‫ܔ‬ᕚᘸ‫ݳ‬๐‫ۓ‬ ࠟߝතᡐ! ඪ՞ᕚreview ‫׏‬ᲀ! ଠ‫!ޞ‬ ᨻᇔ᫣! ᕮᓒ! ඪ՞ᕚᔮᕹ ࠔߝᜰ! ᰸۱! አಁᕚᔮᕹ አಁ‫!௳מ‬ ḵᦤᎱ! ᬩ០ᕚᔮᕹ ၚۖ! ӫ᷌! ‫ول‬๐‫ۓ‬review • • • ߝᇈ! ߝᔄ! තᡐ! ࣈ࣎! Ӿ।ପਂ! LBS! Ꭸ‫מ‬വᭆ! ࠟߝຽᓋ! ᦈ‫!ڹࠓܔ‬ አಁຽᓋ! ᦈ‫ܔ‬આᕅ! ᦈ‫!ݸࠓܔ‬ ࠔߝ૰! ࠔߝ‫!ܜ‬ አಁ᭗ᤈ ᦤ! ೆ‫ܔ‬୚ක! ࠔߝඪ՞! ᒫӣො! ඪ՞! ጭ୯! ᦊᦤ! ӻ௔۸ᬩ ០֖! ӻ௔۸૲ ੴ! 横向:针对单个核心U务系统进行检查 纵向:针对U务线v联系统进行t链路检查 重点:架构、流程、缓存、消息队列、数据库、性能、高可用、隔离、限流、降级、熔断等 84
87. ൉‫܋‬QPS&ᴴၞ ൉‫ܔ܋‬๢QPS! ๐‫ۓ‬ಘ਻! ๐‫ۓ‬ᆤෙ! ਮಁᒒᴴၞ! ๐‫ۓ‬ᴴၞ! ս۸ᔮᕹ҅൉‫܋‬ ‫ܔ‬ള‫ߥݗ‬ଫ᭛ ଶ҅൉‫܋‬ෆ֛ QPS҅ᰒ੒ṛଚ ‫ߥ̵ݎ‬ଫౌള‫ݗ‬ ൉‫܋‬ള‫ݗ‬௔ᚆ! ࣁ൉‫ܔ܋‬๢QPS चᏐӤ҅ইຎ਻ ᰁᬮӧჿ᪃҅‫ڞ‬ ᘍᡤಘ਻҅ᵱᥝ ᘍᡤฎ‫ܔ‬๢಄ಘ ਻᮱ᗟᬮฎग़๢ ಄ಘ਻᮱ᗟ! ᰒ੒๐‫ۓ‬ਫֺզ ݊ള‫ᦡݗ‬ᗝᆤෙ ᴇ꧊҅୮०ᨳሲ ᬡ‫ᦡک‬ਧጱᴇ ꧊҅‫ސڞ‬አᆤෙ! ๐‫ۓ‬ᒒᬬࢧᲙ᧏ Ꮁ҅ਮಁᒒࣁ೰ ਧ෸ᳵٖ‫ݎ‬᩸ጱ ᧗࿢ፗളࣁਮಁ ᒒᤩೝ౼҅‫ٺ‬੝ ੒‫ݸ‬ᒒ๐‫ۓ‬ጱ٫ ‫!ڋ‬ ᴴၞ֢ԅଫ੒ၞ ᰁཛྷࣳ‫ݒ‬۸ጱ๋ ‫ݸ‬Ӟሾ҅ইຎ‫ސ‬ አ҅Ḓ‫ࣁض‬ Janus APIᗑ‫ى‬ ඪ೮Ӿ।ᴴၞ҅ ‫ݶ‬෸ᕮ‫ݳ‬OSP؉ ๜๢ᴴၞ҅‫ݶ‬෸ ‫ڹ‬ᒒᵱᥝᘍᡤአ ಁ֛ḵ‫݋‬অ൉ᐏ! 85
88. ਻࢏ᛔۖಘ਻ TargetNumOfPods = ceil(sum(CurrentPodsCPUUtilization) / Target) ! Pod 1! ݇ᆙKubernetesጱHPAҁHorizontal Pod Autoscaling҂ᓒဩ҅ᛔ Ꮈ‫ݎ‬ਫሿᛔۖಘ਻ᖽ਻ Pod 2! RC/Deployment Scale! CurrentPodsCPUUtilizationԅ୮‫ݣྯڹ‬podጱCPUֵአሲ҅ TargetԅਧԎጱଫአCPUֵአሲ೰ຽ ‫ᦡ؃‬Target ਧԅԅ50%҅୮‫࢏਻ڹ‬CPUֵአሲጱଘ࣐꧊ԅ60%҅ํ 10ӻ਻࢏ਫֺ҅‫ڞ‬CurrentPodsCPUUtilization=60%*10=6҅‫ڞ‬ TargetNumOfPods=ceilҁ6/0.5҂=12҅‫ڞ‬ᵱᥝಘ਻12-10=2‫࢏਻ݣ‬ Pod 1! 86 … Pod N!
89. Janusᴴၞຝ຅ VGW! NGINX! VGW! Backup Backup VGWᑏۖ! JANUS! NGINX! VGWᑏۖ! Backup Backup JANUS! APP! APP! VGWचԭDPDKਫሿԧࠔߝտṛ௔ᚆࢥ੶ള‫ف‬ᗑ‫ى‬VGW҅ࣁӧी‫ے‬Ꮭկ౮๜ጱचᏐӥ҅ፘ‫ݶ‬ฦ᭗๐‫࢏ۓ‬ጱ᫨‫ݎ‬௔ᚆฎฦ᭗ LVSጱ4‫׭‬ 87
90. Janusᴴၞොໜ ෆऒ ᴴၞ ऒ 01 JANUSᴴၞ IP 02 03 ೲip ᴴၞ • • • • • ള‫ݗ‬ ೲള‫ݗ‬ ᴴၞ JANUSᴴၞඪ೮ೲऒ̵IP̵ള‫ݗ‬ӣᐿᖌଶᦡᗝᴴၞᒽኼ ೲऒᴴၞғᦡᗝෆऒጱQPSᴴၞ҅‫ݢ‬զᴠྊෆऒᤩ௶఺ධ‫ڋ‬ ೲIPᴴၞғᦡᗝአಁIPᴴၞ҅‫ݢ‬զአ๶ᴠ‫̵ڬ‬ᴠἓԾ ೲള‫ݗ‬ᴴၞғᦡᗝള‫ݗ‬ᖌଶᴴၞ҅ᴠྊ‫ܔ‬ള‫ڬᤩݗ‬ ӥ‫ܔ‬ᕚ̵ඪ՞ᕚ̵ᭌᨻᕚ‫ݢڦړ‬զ՗janus‫ᦡݗف‬ᗝऒጱᴴၞQPS҅Ԟ‫ݢ‬զᰒ੒ӞԶၞᰁཛྷࣳ‫ݎ‬ኞ‫ݒ‬۸ጱള‫ᦡݗ‬ᗝᴴၞQPS҅Ԟ‫ݢ‬զᰒ੒ӞԶἓԾᦡᗝIPጱᴴ ၞ 88
91. JanusӾ।ᴴၞ LB‫!ݗف‬ Janusᵞᗭ IDC1 ๜ࣈ ဌํ ᬡ‫ک‬ ᴴၞ ᴇ꧊ janus! janus! janus! ……! IDC2 janus! janus! janus! ……! ๜ࣈ‫ܔ‬๢᩻ᬦᴴၞᴇ꧊ Ӿ।ᴴၞ! Ӿ।ᴴၞ! LB‫!ݗف‬ Ӿ।ᴴၞ! Ӿ।ဌํᬡ‫ک‬ᴴၞᴇ꧊ ‫ݸ‬ᒒ๐‫!ۓ‬ ‫ݸ‬ᒒ๐‫!ۓ‬ LB‫!ݗف‬ 89 ‫ݸ‬ᒒ๐‫!ۓ‬
92. OSPᴴၞ Client! Local Proxy! • • • ‫ܔ‬ਫֺ/‫ܔ‬ള‫ݗ‬ ᴴၞ! ‫ܔ‬ਫֺ/‫ܔ‬ള‫ݗ‬ ᴴၞ! ‫ܔ‬ਫֺ/‫ܔ‬ള‫ݗ‬ ᴴၞ! ‫ܔ‬ਫֺ/‫ܔ‬ള‫ݗ‬ ᴴၞ! Service! Service! Service! Service! OSP๐‫ۓ‬ඪ೮ೲ‫ܔ‬ਫֺᴴၞ҅‫ܨ‬ᰒ੒ӧ‫ݶ‬ਫֺጱ๢࢏ᯈᗝ҅ӱ‫ݢݎ୏ۓ‬զᦡᗝӧ‫ݶ‬ਫֺጱᴴၞQPS OSP๐‫ۓ‬ඪ೮ೲ‫ܔ‬ਫֺጱ‫ܔ‬ള‫ݗ‬ᴴၞ҅‫ݢ‬զᰒ੒ӧ‫ݶ‬ጱള‫҅ݗ‬ӱ‫ᦡݎ୏ۓ‬ᗝӧ‫ݶ‬ਫֺጱള‫ݗ‬ᴴၞQPS ӥ‫ܔ‬ᕚ̵ඪ՞ᕚզ݊ᭌᨻᕚᔮᕹ‫ݢ‬զ‫ڦړ‬ೲᆙၞᰁཛྷࣳᦧ֌ᔮᕹ਻ᰁ҅ᬰᘒᦡᗝਫֺᴴၞଚᰒ੒ӞԶၞᰁᑱीള‫ᦡݗ‬ᗝ‫ܔ‬ਫֺള‫ݗ‬ᴴၞ 90
93. य़‫׏‬ӥ‫ܔ‬ ᭌᨻ ӫ᷌๐‫!ۓ‬ य़‫׏‬ၚۖ๐‫!ۓ‬ ൤ᔱ๐‫!ۓ‬ ‫ړ‬ᔄ๐‫!ۓ‬ ӻ௔۸വគ๐‫!ۓ‬ තᡐ/‫ے‬ᨻ ࠟߝතᡐ๐‫!ۓ‬ ߝᇈතᡐ๐‫!ۓ‬ ᨻᇔ᫣๐‫!ۓ‬ ࠟߝ‫௳מ‬๐‫!ۓ‬ ၚۖսణ๐‫!ۓ‬ ᕮᓒӥ‫ܔ‬ ᕮᓒ๐‫!ۓ‬ ᦈ‫ܔ‬๐‫!ۓ‬ ࣈ࣎๐‫!ۓ‬ ‫ݎ‬ᐥ๐‫!ۓ‬ ପਂ๐‫!ۓ‬ ඪ՞ ඪ՞ଘ‫ݣ‬๐‫!ۓ‬ ࠔߝ૰๐‫!ۓ‬ ࠔߝ‫ܜ‬๐‫!ۓ‬ ࠔߝඪ՞๐‫!ۓ‬ ᗑᱷඪ՞๐‫!ۓ‬ 91
94. य़‫׏‬ग़᭗᭲୑ྍၞ‫ܔ‬આᕅ ᦈ‫ܔ‬આᕅ ๐‫ۓ‬ ᦈ‫ܔ‬ᶼӥ‫ݎ‬ ҁJOB҂ ౌ஠᩠! MP! JIT! ᛔ០! ፗ‫!ݎ‬ ၹႣ! ᦈ‫ܔ‬ପਂ‫ړ‬ᯈ ҁJOB҂ ౌ஠᩠! MP! JIT! ᛔ០! ፗ‫!ݎ‬ ၹႣ! ᦈ‫ܔ‬ᬌ‫ڊ‬ ҁJOB҂ ౌ஠᩠! MP! JIT! ᛔ០! ፗ‫!ݎ‬ ၹႣ! ପਂ‫ړ‬ᯈ ๐‫!ۓ‬ VIS! TMS! WMS! 92 HTS!
95. ӥӞդங๐‫ۓ‬ຝ຅Service Mesh 93
96. ங๐‫ۓ‬ຝ຅ዳᅩ—୏რங๐‫ۓ‬໛ຝᄍᬰࢯᵙ ၾᩇᘏ๐‫ۓ‬ ၾᩇᘏ๐‫ۓ‬1! 1.0ᇇ๜ SDK! ൉‫׀‬ᘏ๐‫ۓ‬A! 1.0ᇇ๜ SDK! ၾᩇᘏ๐‫ۓ‬2! 2.0ᇇ๜ SDK! ൉‫׀‬ᘏ๐‫ۓ‬B! 2.0ᇇ๜ SDK! ၾᩇᘏ๐‫ۓ‬3! 2.5ᇇ๜ SDK! ൉‫׀‬ᘏ๐‫ۓ‬C! 2.5ᇇ๜ SDK! ൉‫׀‬ᘏ๐‫ۓ‬ • • ୮ᭌೠDubbo౲ᘏSpring Cloudங๐‫ۓ‬໛ຝ෸҅ӱ‫ۓ‬ᔮᕹ᮷ᵱᥝള‫ف‬ங๐‫ۓ‬໛ຝSDK҅ӱ‫ۓ‬դᎱӨங๐‫ۓ‬໛ຝ୩ᘠ‫ݳ‬୩ᕬਧ ᵋ፳ங๐‫ۓ‬໛ຝጱᄍᬰ҅ӱ‫ۓ‬Ꮈ‫ࢫݎ‬ᴚӞᛱᘸᆌࣁӱ‫ۓ‬Ꮈ‫ݎ‬๜᫝҅உ੝ํ෸ᳵզ݊ᔜ‫܋݄ێ‬ᕆෛᇇ๜҅ᴻᶋԏ‫ڹ‬ጱ໛ຝ‫ڊ‬ሿ᯿ य़௔ᚆᳯ᷌౲ᘏBug҅ӧᆐஉᵙവۖӱ‫ࢫۓ‬ᴚਖ਼‫ق‬᮱๐‫܋ۓ‬ᕆ‫๋ک‬ෛጱங๐‫ۓ‬໛ຝSDK҅‫ํֵܨ‬᮱‫ࢫړ‬ᴚ‫܋‬ᕆԧSDK҅ӞᛱӞ ୏তԞ‫ݝ‬ฎᭌೠ‫پ‬ӻᶋ໐ஞ๐‫܋ۓ‬ᕆ๋ෛSDK๋҅ᕣ੕ᛘᕚӤ‫ݢ‬ᚆտ‫ݶ‬෸ਂࣁग़ӻSDKᇇ๜ 94
97. ங๐‫ۓ‬ຝ຅ዳᅩ—ᛔᎸங๐‫ۓ‬໛ຝᄍᬰࢯᵙ ӱ‫ۓ‬Ꮈ‫ݎ‬᮱ᳪA ၾᩇᘏ๐‫ۓ‬A1! ӱ ‫ۓ‬ Ꮈ ‫ݎ‬ ᮱ ᳪ B • • • • 1.0ᇇ๜ SDK! ၾᩇᘏ๐‫ۓ‬A2! 2.0ᇇ๜ SDK! ൉‫׀‬ᘏ๐‫ۓ‬A3! 3.0ᇇ๜ SDK! ၾᩇᘏ๐‫ۓ‬B1! 1.0ᇇ๜ SDK! 2.0ᇇ๜ SDK! ၾᩇᘏ๐‫ۓ‬C1! ൉‫׀‬ᘏ๐‫ۓ‬B2! 1.0ᇇ๜ SDK! 2.0ᇇ๜ SDK! ൉‫׀‬ᘏ๐‫ۓ‬C2! ൉‫׀‬ᘏ๐‫ۓ‬B3! 2.0ᇇ๜ SDK! 3.0ᇇ๜ SDK! ၾᩇᘏ๐‫ۓ‬C3! ӱ ‫ۓ‬ Ꮈ ‫ݎ‬ ᮱ ᳪ C ದ๞ਫ‫ێ‬୩ጱय़‫҅ݪل‬ᭌೠᛔᎸ‫ݎ‬ங๐‫ۓ‬໛ຝ҅໛ຝᦡᦇԏ‫ڡ‬Ԟӧฎ‫܈ق܈‬ᗦ҅‫ݚ‬क़Ӟ୏তӞᛱ‫ݝ‬൉‫๋׀‬च๜ጱ๐‫ۓ‬᭗‫ۑמ‬ᚆ҅ๅग़ጱ๐‫ۓ‬လቘ‫ۑ‬ᚆ տࣁ‫ݸ‬ᖅᇇ๜೮ᖅᄍᬰ̵೮ᖅവ‫ڊ‬ ӧ‫ݶ‬ጱӱ‫ۓ‬᮱ᳪտ‫ྍړ‬᭑Ⴙള‫ف‬ங๐‫ۓ‬໛ຝ҅‫ݶ‬෸ෛᇇ๜໛ຝവ‫ڊ‬෸҅ӞᛱԞտᭌೠӞԶᶋ໐ஞ๐‫ᦶۓ‬አ҅ဌํᳯ᷌ԏ‫҅ݸ‬ٚവଠ‫ک‬໐ஞ๐‫ۓ‬ ෛᇇ๜SDKവଠጱᬦᑕ҅Ӟ໏տᶎԁӱ‫ۓ‬᮱ᳪ஬ԭӱ‫ۓ‬Ꮈ‫҅ݎ‬ဌํᔜ‫޾ێ‬෸ᳵള‫҅ف‬౲ᘏ᧔ᵱᥝᥡ๕ٌ՜᮱ᳪള‫ف‬ဌํᳯ᷌ԏ‫҅ݸ‬ᛔ૩ٚള‫ف‬ ᐿᐿܻࢩ๋҅ᕣԞտ੕ᛘங๐‫ۓ‬໛ຝᄍᬰࢯᵙ̶ 95
98. ங๐‫ۓ‬ຝ຅ዳᅩ—ग़᧍᥺Ꮈ‫ݎ‬౮๜ṛ PHP᧍᥺๐‫ۓ‬ ၾᩇᘏ๐‫ۓ‬A1! Java ᧍ ᥺ ๐ ‫ۓ‬ • • • 1.0ᇇ๜ PHP SDK! 2.0ᇇ๜ PHP SDK! ၾᩇᘏ๐‫ۓ‬A2! ൉‫׀‬ᘏ๐‫ۓ‬A3! 3.0ᇇ๜ PHP SDK! ၾᩇᘏ๐‫ۓ‬B1! 2.0ᇇ๜ Java SDK! 1.0ᇇ๜Go SDK! ၾᩇᘏ๐‫ۓ‬C1! ൉‫׀‬ᘏ๐‫ۓ‬B2! 2.0ᇇ๜ Java SDK! 2.0ᇇ๜Go SDK! ൉‫׀‬ᘏ๐‫ۓ‬C2! ၾᩇᘏ๐‫ۓ‬B3! 3.0ᇇ๜ Java SDK! 3.0ᇇ๜Go SDK! ൉‫׀‬ᘏ๐‫ۓ‬C3! ᰒ੒ӧ‫᥺᧍ݎ୏ݶ‬൉‫׀‬ӧ‫ݶ‬ጱங๐‫ۓ‬໛ຝSDK҅ྲইᰒ੒Java̵PHP̵Goᒵ‫ݱ‬൉‫׀‬ӞॺSDK ԅԧඪ೮ग़᧍᥺҅ᵱᥝᰒ੒ྯᐿ୏‫᥺᧍ݎ‬᯿॔୏‫ݎ‬๐‫ۓ‬လቘ‫ۑ‬ᚆ҅Ꮈ‫ݎ‬౮๜ᶋଉṛ ग़᧍᥺ጱఘ‫٭‬ӥ҅ங๐‫ۓ‬໛ຝ‫܋‬ᕆๅ‫ࢯے‬ᵙ 96 Go ᧍ ᥺ ๐ ‫ۓ‬
99. ங๐‫ۓ‬ຝ຅ዳᅩ—ದ๞਍ԟ౮๜ṛ • զSpring Cloudԅֺ҅ሿํங๐‫ۓ‬໛ ຝದ๞ٖ਻ग़҅ᳪདṛ • ӱ‫ۓ‬Ꮈ‫ݎ‬Ոާᵱᥝಭ‫ف‬य़ᰁᔜ‫ێ‬ᆧఀ զ݊਍ԟ໛ຝ Spring Cloud! Spring Cloud Netflix! Spring Cloud Config! Eureka! Spring Cloud Bus! Zuul! Spring Cloud Data Flow! Ribbon! Spring Cloud Consul! Feign! Spring Cloud Security! Hystrix! Spring Cloud Sleuth! Turbine! Spring Cloud Task! 97
100. ‫پ‬ᐿங๐‫ۓ‬ຝ຅ཛྷୗྲ᫾ ங๐‫ۓ‬ຝ຅ཛྷୗӞҁਮಁᒒ્‫ف‬ୗդቘ҂ ங๐‫ۓ‬ຝ຅ཛྷୗԫҁਮಁᒒᇿᒈᬰᑕդቘ҂ Registry! Registry! subscribe Consumer Proxy • • • notify invoke register Provider subscribe Consumer notify Proxy Registry! register invoke ங๐‫ۓ‬ຝ຅ཛྷୗӣҁਮಁᒒ๐‫ۓ‬ᒒᇿᒈᬰᑕդቘ҂ Provider subscribe Consumer notify Proxy invoke register Proxy Provider ங๐‫ۓ‬ຝ຅ཛྷୗӞ҅ਮಁᒒ્‫ف‬ங๐‫ۓ‬໛ຝSDK҅ӱ‫ۓ‬᭦ᬋӨSDK୩ᕬਧ҅ங๐‫ۓ‬໛ຝ೮ᖅᄍᬰࢯᵙ҅ग़᧍᥺ඪ೮ӧ᪃ ங๐‫ۓ‬ຝ຅ཛྷୗԫ҅ਮಁᒒӨங๐‫ۓ‬໛ຝProxy᮱ᗟࣁ‫ݶ‬Ӟ๢࢏ጱӧ‫ݶ‬ᬰᑕ҅‫ݱ‬ᛔᇿᒈ᮱ᗟ҅๐‫ۓ‬လቘ᭦ᬋ՗ਮಁᒒӱ‫ۓ‬᭦ᬋӾ ᥴᘠ‫ڊ‬๶҅ӞਧᑕଶӤங๐‫ۓ‬໛ຝ‫ݢ‬զᇿᒈԭ๐‫ۓ‬೮ᖅ‫܋‬ᕆᄍᬰ҅‫ݶ‬෸‫ݢ‬զྲ᫾ො‫׎‬ඪ೮ग़᧍᥺ҁࠔߝտOSP໛ຝᔄ֒ইྌ҂ ங๐‫ۓ‬ຝ຅ཛྷୗӣ҅ਮಁᒒզ݊๐‫ۓ‬ᒒӨங๐‫ۓ‬໛ຝProxy‫ڦړ‬᮱ᗟࣁ‫ݶ‬Ӟ๢࢏ጱӧ‫ݶ‬ᬰᑕ҅ྌᐿཛྷୗ੪ฎ୮ӥྲ᫾ၞᤈጱ Service Mesh҅᭗ᬦiptablesೝ౼᧗࿢ଚ᫨‫᧗ݎ‬࿢҅ᶋଉ਻ฃ೮ᖅ‫܋‬ᕆᄍᬰ҅ଚஉ਻ฃඪ೮ग़᧍᥺ 98
101. ӥӞդங๐‫ۓ‬໛ຝ—Service Meshຝ຅ • • • Service A! Service B! Sidecar! Sidecar! Service Meshฎአԭ॒ቘ๐‫ۓ‬ᳵ᭗‫מ‬ጱचᏐᦡෞ੶҅አԭࣁԯܻኞଫአ॔๥ጱ๐‫ۓ‬೐ಏӾਫሿ‫ݢ‬ᶌጱ᧗࿢փ᭓҅ࣁਫ᪢Ӿ҅ Service Mesh᭗ଉਫሿԅӞᕟ᫷ᰁᕆጱᗑᕶդቘ҅ਙժӨଫአӞ᩸᮱ᗟ҅֕੒ଫአ᭐ก ๐‫ۓ‬ӨSidecar᮱ᗟࣁ‫ݶ‬Ӟ‫ݣ‬๢࢏ጱӧ‫ݶ‬ᬰᑕԏӾ҅๐‫ۓ‬ԏᳵጱ᭗‫מ‬᭗ᬦSidecarփ᭓ Sidecar఺ԅᬟ᫣҅ਮಁᒒ޾๐‫ۓ‬ᒒ᭗‫מ‬ጱ᫷ᰁᕆ๐‫ۓ‬դቘ੶҅ 99
102. Service Mesh๐‫ۓ‬ᗑ໒ Service Mesh๐‫ۓ‬ᗑ໒ ๐‫ۓ‬ᳵ᧣አ᭗ᬦSidecarᬰᤈդቘ • • Ӥᬿ᠗ᜋ໛ԅ๐‫҅ۓ‬ᖖᜋ໛ԅSidecar҅ਖ਼ૢࢶጱ᠗ᜋ໛݄ധԏ‫҅ݸ‬ᖖᜋጱSidecarᕟ౮Service Mesh๐‫ۓ‬ᗑ໒ ๐‫ۓ‬ᳵ᧣አ࣐҅᭗ᬦSidecarդቘ᫨‫҅ݎ‬ᨮ᫹࣐ᤍ̵๐‫ۓ‬᪠ኧ̵ᆤෙ̵ᴴၞᴳᕆᒵ๐‫ۓ‬လቘ࣐᭗ᬦSidecarਫሿ 100
103. Service Meshग़᧍᥺ඪ೮ Java๐‫!ۓ‬ Go๐‫!ۓ‬ • • Sidecar! Sidecar! Sidecar! Service Mesh‫ݢ‬զᶋଉ਻ฃඪ೮ग़᧍᥺ ྲইJava๐‫̵ۓ‬PHP๐‫̵ۓ‬Go๐‫ۓ‬ԏᳵጱ᧣አ࣐҅᭗ᬦSidecarդቘ 101 PHP๐‫!ۓ‬
104. ӱኴService MeshԾߝ 1 LinkerdғᒫӞӻService MeshԾߝ҅2016ଙ 1์ኧBuoyant‫ݢ҅૲ݎݪل‬զᬩᤈࣁK8s̵ Dockerᒵଘ‫҅ݣ‬ฎଘ‫ݣ‬෫‫ى‬ጱ҅ඪ೮‫ݱ‬ᐿ๐ ‫ۓ‬လቘ‫ۑ‬ᚆ 2 Envoyғ2016ଙ9์ኧLyftਯ૲୏რ҅Ԟฎ ଘ‫ݣ‬෫‫ى‬ጱ҅ฎӞӻṛ௔ᚆC++୏რ๐‫ۓ‬դ ቘ҅ፓ‫ڹ‬Ԇᥝአ֢Istioጱහഝଘᶎ҅૪ᕪࣁ Airbnb̵Google̵ebay̵Mircosoftᒵ‫ق‬ቖ Ꭳ‫ֵݪلݷ‬አ̶ 3 IstioғIstioኧGoogle̵IBM̵Lyftᘶ‫୏ݳ‬ რ҅ᤩᑍԅᒫԫդService Mesh҅ԭ2017 ଙ5์‫҅૲ݎ‬ኧහഝଘᶎ޾ഴ‫ګ‬ଘᶎᕟ౮҅ ๋ᕣፓຽฎଘ‫ݣ‬෫‫ى‬ጱ 102 4 Conduitғ2017ଙ12์ኧBuoyant‫҅૲ݎݪل‬ 2018ଙ‫ݳ‬ଚ‫ک‬LinkerdᶱፓӾ҅౮ԅ Linkerd2.0ጱचᏐ 5 SOFAMeshғ 2018ଙ7์ኧᡶᡵᰂ๐୏რ ጱӞྃService MeshԾߝ҅ฎचԭ Istio ද ᬰ޾ಘ઀ᘒ๶ጱ Service Mesh य़ᥢཛྷ៧ࣈ ਫ᪢ොໜ 6 Mesherғ܏ԅࣁ2018ଙ10์୏რጱӞྃ Service MeshԾߝ҅चԭᛔᎸጱGo᧍᥺ங๐ ‫ۓ‬໛ຝgo-chassis୏‫ݎ‬
105. Istioຝ຅ • Data PlaneғහഝଘᶎኧӞᕟզSidecarොୗ᮱ᗟጱ ฬᚆդቘҁEnvoy҂ᕟ౮҅ᬯԶդቘ‫ݢ‬զ᧣ᜓ޾ഴ ‫ګ‬ங๐‫ ݊ۓ‬Mixerԏᳵಅํጱᗑᕶ᭗‫מ‬ Service A! • Control Planeғഴ‫ګ‬ଘᶎᨮᨱᓕቘ޾ᯈᗝդቘጱ᪠ ኧ҅‫ݶ‬෸‫ݢ‬զᯈᗝਫෞᒽኼզ݊තᵞፊഴහഝ Service B! HTTP/1.1҅HTTP/2҅gRPC҅ TCP҅TLS Proxy! • EnvoyғIstio ֵአEnvoyդቘጱಘ઀ᇇ๜҅դቘ๐ ‫ۓ‬ᗑ໒ጱಅํ‫فڊ‬ၞᰁ Proxy! Proxy! Data Plane • Pilotғਫሿၞᰁഴ‫ګ‬զ݊ฬᚆ᪠ኧ • Mixerғᨮᨱࣁ๐‫ۓ‬ᗑ໒ಗᤈᦢᳯഴ‫ګ‬զֵ݊አᒽ ኼ҅ଚ՗Envoyզٌ݊՜๐‫ۓ‬තᵞፊഴහഝ Config data To proxies • Citadelғ᭗ᬦٖᗝ᫝ղ޾‫ᦤڂ‬ᓕቘ҅൉‫׀‬୩य़ጱ๐ ‫ۓ‬ᳵ޾๋ᕣአಁ᫝ղḵᦤ Pilot! Policy checks҅ telemetry Mixer! Control Plane 103 TLS certs To proxies Citadel!
106. SOFAMeshຝ຅ HTTP/1.1 HTTP/2 SOFAMeshचԭIstioදᬰ޾ಘ઀҅ํইӥදᬰғ • SOFA RPC MOSN! ᯻አ Golang ᖫٟጱ MOSN ‫ݐ‬դ Envoy • ‫ݳ‬ଚMixer‫ک‬හഝଘᶎզᥴ٬௔ᚆኒ᷀ • ी୩ Pilot զਫሿๅᅎၚጱ๐‫ݎۓ‬ሿ๢‫ګ‬ • ी‫ے‬੒ SOFA RPC̵Dubbo ጱඪ೮ Dubbo RPC golang XDS API Mixer Service Pilot! Mixer! Control Plane 104 Citadel!
107. Service Meshս۠ 1 ๅঅጱԯܻኞຝ຅ඪ೮ғDocker਻࢏‫ݢ‬զள ᭛᮱ᗟங๐‫҅ۓ‬K8S‫ݢ‬զᖫഭ਻࢏҅ᘒ Service Mesh‫ݢ‬զஉঅጱᥴ٬๐‫ۓ‬ᳵ᭗‫҅מ‬ӷ ᘏጱᕮ‫ݳ‬տࣁ਻࢏޾ங๐‫ۓ‬ᶾऒᬡ‫ݳڻ݌ک‬ኃ ጱපຎ 2 ໛ຝ‫ݢ‬զ೮ᖅᄍᬰғService Meshጱ SidecarӨ๐‫ۓ‬ᇿᒈ᮱ᗟᇿᒈᬩᖌ҅ࢩྌ‫ݢ‬ զࣁӧ୽ߥӱ‫ۓ‬ጱఘ‫٭‬ӥ҅ᇿᒈ‫܋‬ᕆզ݊ᄍ ᬰ 3 ඪ೮ग़᧍᥺ғSidecar੒ଫአ᭐ก҅‫ݢ‬զ᯻አ ᛔ૩ጱ୏‫᥺᧍ݎ‬ᬰᤈ୏‫҅ݎ‬ᇿᒈᄍᬰ҅‫ݱ‬ᐿ๐ ‫ۓ‬ҁग़᧍᥺҂‫ݎ‬᩸๐‫᧣ۓ‬አ෸҅ྲই‫ݢ‬զ᭗ᬦ iptablesೝ౼᧗࿢҅ᕹӞኧSidecarդቘ 105 4 ᴳ֗ದ๞ᳪདғService MeshฎचᏐᦡෞ੶҅ ੒ଫአ᭐ก҅ӱ‫ۓ‬Ꮈ‫ݎ‬᮱ᳪӧᵱᥝٚᆧఀங๐ ‫ۓ‬໛ຝጱྯӞӻ‫ۑ‬ᚆཛྷࣘ҅‫ݝ‬ᵱӫဳࣁᛔ૩ጱ ӱ‫ۓ‬Ꮈ‫ݎ‬ 5 ‫ے‬୩ᬩᖌᓕቘғኧԭSidecarӨ๐‫ۓ‬ᇿᒈ᮱ ᗟࣁӧ‫ݶ‬ጱᬰᑕ҅ᬩᖌՈާ‫ݢ‬զᰒ੒ Sidecarᇿᒈ‫܋‬ᕆ̵ᖌಷ҅ຄय़‫ے‬୩ᬩᖌᚆ ‫ێ‬ 6 ‫ے‬᭛ԾߝԻ՞ғᎸ‫ݎ‬Ոާӧᵱᥝ‫ؙ॓‬य़ᰁጱ໛ ຝᎣᦩ҅ࢩྌࣁᶱፓᎸ‫ݎ‬෸҅‫ݢ‬զਖ਼ๅग़ᔜ‫ێ‬ ಭ‫ࣁف‬ӱ‫ۓ‬Ꮈ‫҅ݎ‬൉‫܋‬Ꮈ‫ݎ‬පሲ҅‫ے‬᭛Ծߝள ᭛Ի՞̶
108. ࠔߝտService Mesh๐‫ۓ‬۸֛ᔮᦿኞ ᇙᅩ • OSPҁOpen Service Platform҂ • Thrift over Netty • चԭJava᧍ဩጱDSᶾऒᇙਧ᧍᥺ • ဳٙӾஞZookeeper • ᙪਮಁᒒҁӱ‫ۓ‬դᎱӨOSP໛ຝᕬਧࣁӞ᩸҂ • Service! Registry! ๐‫زۓ‬හഝӤಸ ๐‫ᦈۓ‬ᴅ च๜๐‫ۓ‬လቘᚆ‫ێ‬ ᗌᅩ • ᧍᥺‫ܔ‬Ӟ҅‫ݝ‬ඪ೮Java • ӱ‫ۓ‬դᎱӨOSP໛ຝᕬਧࣁӞ᩸҅‫܋‬ᕆෛᇇ๜ࢯᵙ҅ ӧ‫ڥ‬ԭ໛ຝᄍᬰ • ॔๥໛ຝդᎱ્‫ف‬੒ӱ‫ۓ‬ᬰᑕ୽ߥय़ Service! Config Center! JavaApp! OSP client! ๐‫ဳۓ‬ٙ ๐‫ۓ‬᪠ኧ ᗑᕶփᬌ ๐‫زۓ‬හഝӥ‫ݎ‬ 106 OSP Server!
109. ࠔߝտService Meshຝ຅ᵤ୵ • ਮಁᒒSidecar • ๜ࣈդቘզ݊॓ղӾ।դቘᵞ ᗭ҅ԆӨ॓ • • ᫷ᰁᕆդቘਮಁᒒ҅๜ࣈ᧣ አ҅๐‫ۓ‬လቘ՗ӱ‫ۓ‬դᎱುᐶ ‫ک‬Proxy Remote Proxy Cluster! Service! Registry! ॓አ᱾᪠ ๐‫ᦈۓ‬ᴅ ኧLocal Proxyᨮᨱ๐‫ۓ‬လቘ Өᬱᑕ᭗‫מ‬ • Remote Proxyᨮᨱ॓ղ޾ᶋ Ԇၞၞᰁ • ᯈᗝ‫௳מ‬ᕹӞࣁService Config Centerᬰᤈᯈᗝ҅ଚ ᬰᤈᯈᗝӥ‫ݎ‬ JavaApp! OSP client! 107 Service! Config Center! ॓አ ๐‫ۓ‬᪠ኧ ᗑᕶփᬌ Local Proxy! ๐‫ဳۓ‬ٙ ๐‫ۓ‬᪠ኧ ᗑᕶփᬌ OSP Server! ᯈᗝӥ‫ݎ‬
110. ࠔߝտService Meshग़᧍᥺ਮಁᒒള‫ف‬ • Java᯻አThrift over tcp҅PHP/C/ C++/Node js᯻አJSON over HTTP • Java/PHP҅Local ProxyԆ҅ Remote Proxy Cluster॓ • • Remote Proxy Cluster! JSON over HTTP C/C++/Node js҅Remote Proxy Cluster C/C++! Node js! ໑ഝӧ‫ݶ‬ጱള‫ګ᥺᧍ف‬ਧӧ‫ݶ‬ጱള ‫ف‬ᒽኼ Java! PHP! Thrift over tcp Thrift over tcp JSON over HTTP 108 Local Proxy! Local Proxy! Thrift over tcp OSP Server!
111. ࠔߝտService Meshग़᧍᥺๐‫ۓ‬ᒒ Service! Registry! ๐‫ۓ‬ᒒ᯻አRegistry agent • sidecar • ဳٙդቘ • ๐‫ݎۓ‬ሿ ๐‫ဳۓ‬ٙ Local Proxy! HTTP/JSON ؋଼༄ັ ؋଼༄ັ Local Proxy! 109 HTTP/JSON Web Server! Registry ! agent!
112. ࠔߝտService Mesh਻࢏۸ Remote Proxy Cluster! ॓ • ྯ‫ݣ‬ਾԆ๢᮱ᗟग़ӻpod ਾԆ๢1 • ྯ‫ݣ‬ਾԆ๢᮱ᗟ1ӻosp-proxy • ྯӻpod᮱ᗟ1ӻӱ‫ۓ‬Docker਻࢏ • osp-proxy᭗ᬦdaemonset‫ک૲ݎ‬ਾԆ๢ࣈ ࣎෈կ҅pod໑ഝࣈ࣎෈կತ‫ک‬proxy҅ଚ‫ݢ‬ զਫ෸ፊ‫෈࣎ࣈލ‬կ‫ݒ‬۸ ਾԆ๢2 Daemonset pod ! Ԇ Proxy! Proxy! pod ! Ԇ Proxy! Proxy! pod ! ٟ‫࣎ࣈف‬ ፊ‫ݒލ‬۸ Proxy! address file! 110 Daemonset pod ! ٟ‫࣎ࣈف‬ ፊ‫ݒލ‬۸ Proxy! address file!
113. ࠔߝտService MeshӨ਻࢏ෆ‫ݳ‬᮱ᗟຝ຅ C/C++̵Node.js! ̵APP̵Phthon! ᇔቘ๢ Remote Proxy Cluster! Java App! OSP client! ๐‫ݎۓ‬ሿ ๐‫ဳۓ‬ٙ OSP Local Proxy! OSP ᇔቘ๢ PHP App! OSP client! HTTP OSP Server! ๐‫ဳۓ‬ٙ Local Proxy! pod! OSP client! Local Proxy! pod! OSP client! Proxy! address file! ਾԆ๢ • • • Service! Registry! ग़᧍᥺ඪ೮҅Java̵C/C++̵Python̵Node js ProxyӨӱ‫ۓ‬դᎱᥴᘠ҅ᨮᨱ๐‫ۓ‬လቘ҅ᇿᒈ᮱ᗟ҅ள᭛‫܋‬ᕆ ਻࢏̵ᇔቘ๢Ⴐ‫ݳ‬᮱ᗟ 111 HTTP ؋଼༄ັ Web Server! Registry ! agent!
114. ӨIstio‫—ڦ܄‬ဌํserverᒒagent ௔ᚆᘍᡤ • Client Proxy૪ᕪी‫ے‬ԧӞ᪡҅serverᒒٚी‫ے‬Ӟ᪡տ‫ۂے‬௔ ᚆܴ‫ێ‬ AFF 142 cBieDI 4erver .EcaB 2rELM ᮱ᗟᘍᡤ • Serverᒒagent౮ԅ஠ᭌᶱտी‫ے‬ᬩᖌܴ‫ێ‬ • osp serverἕᦊဌํagent҅web server‫ݝ‬ଃӞӻ๐‫ဳۓ‬ٙ agent • ๐‫ۓ‬ᒒጱӞԶလቘ̵᱾᪠̵᭄᪵ᰄ๦‫ۑ‬ᚆ᭗ᬦդᎱൊկጱො ୗਫሿ လቘපຎᘍᡤ • ๐‫ۓ‬ᒒդᎱ્‫ف‬လቘ‫ۑ‬ᚆ‫ݢ‬զᦏလቘපຎๅঅ҅ই൉‫׀‬Ԇۖ GC̵ᕚᑕ࿰ᵍᐶᒵ • ࣁսᵝ௔޾လቘපຎԏᳵ҅ᭌೠԧ‫ݸ‬ᘏ 112 AFF AFF )DvEM )DvEM
115. ӨIstio‫—ڦ܄‬clientᒒӧचԭiptableۙ೮ • Istioጱਮಁᒒ᪜᧍᥺҅ᵭද᭜౮๜҅֕ሿਫ௛ฎஉྜᯡ • IPTable௔ᚆӧ᪃ड़অ҅๐‫ۓ‬᩼ग़᩼ౌ • ձ֜ᕟկ᮷ํӧ‫ݢ‬አጱ෸‫҅ײ‬ਮಁᒒ෫ᦞই֜᮷ᥝํᛔ‫ڔ‬ഘጱᚆ‫ێ‬ ޾‫ݢ‬አጱ॓ղ • ੱᰁ‫ٺ‬੝क़᮱ᕟկׁᩢ҅ӱ‫ۓ‬/ᬩᖌ௛տํ‫ݱ‬ᐿᇙྛጱᵱ࿢ׁ҅ᩢक़ ᮱ᕟկտᕳᛔਧԎᵱ࿢ଃ๶ᵑᏥ • ‫כ‬೮ਮಁᒒᭌೠproxyጱᛔኧଶ޾ᅎၚ௔҅ࣁ౯ժጱਫ᪢Ӿঅ॒य़ ԭ॒ࣕ 113
116. ӨIstio‫—ڦ܄‬DaemonSet VS SideCar Sidecarҁin Pod҂! ੒਻࢏ጱ୽ߥ! Daemonset! ୽ߥय̶़PodӾी‫ے‬sidecar਻࢏҅‫ے‬य़ෆӻPodጱᩒრ ୽ߥੜ̶ਾԆ๢ᶼኸ᮱‫ړ‬ᩒრ‫ۖސ‬ ᵱ࿢҅੒K8sጱ᧣ଶ୵౮ܴ‫҅ێ‬ᇙ‫ڦ‬ฎࣁᩒრᔲୟጱఘ‫ ٭‬daemonset‫!ݢܨ‬ ӥ҅ᘒӬᬮ਻ฃ੕ᛘᩒრၵᩇҁsidecarጱֵአሲᳯ᷌҂! ᬩᖌᵙଶ! ᵙଶय̶़Sidecarඳᵑտ୽ߥ‫ݶ‬Ӟӻpodጱӱ‫ݶ҅࢏਻ۓ‬ ኞ‫!ྒو‬ ᵙଶੜ̶Sidecarඳᵑ‫ݢ‬զਖ਼ၞᰁԁ෸‫کڔ‬ remote proxyᥴ٬! ‫܋‬ᕆᵙଶ! ᵙଶय̶़‫܋‬ᕆSidecarᵱᥝӱ‫࢏਻ۓ‬Ӟ᩸‫᧣ܐ҅૲ݎ‬౮๜ ṛ҅ᘒӬ‫ق‬ᰁ‫܋‬ᕆsidecar੒ෆӻᔮᕹጱۖឌॡय़! ᵙଶੜ̶‫ڔ‬ഘၞᰁ‫ک‬remote proxy‫ݢ‬զਫሿአ ಁ෫ఽᎣ෫ഖ‫܋‬ᕆ̶‫ݢ‬զ᫷ฃጱਫሿ‫ق‬ᗑӞ์ Ӟ‫܋‬ᕆ҅ள᭛ጱᬽդ̵៧ࣈ̵‫ݍ‬ḇ! ‫ܔ‬๢ֵአ҅෫ᶳಘ਻! ᵱᶼ‫ض‬໑ഝਾԆ๢ጱᯈᗝ᧣ෆProxyጱᩒრզ ଫ੒ਮಁᒒीग़ጱఘ‫਻̶٭‬ᰁ᩻ຽ‫ڞ‬ԁ෸᫨ᑏ ‫ک‬remote proxy! ۖாಘ਻ᵙଶ! 114
117. ӨIstio‫—ڦ܄‬Remote Proxyጱհ꧊ • Ԇᥝᘳᨱғ॓ղၞᰁ̵ԁ෸ၞᰁ̵ᶋԆᥝၞᰁ • ṛ‫ݢ‬አຝ຅ғsidecarฎஉᗦঅ҅֕୮sidecar೯ധ෸҅ইຎమᥝਮ ಁᒒӧӨsidecarӞ᩸ྒധ҅ྌ෸ࠔӞᚆමᅉጱ҅੪ฎਮಁᒒᚆड़ ᛔۖ‫ڔ‬ഘҁsdkᛔଃ҂҅ଚӬํ॓ղҁremote proxy҂‫ݢ‬አ • ᬩᖌጱ‫ڥ׎‬௔ғ • ‫܋‬ᕆLocal Proxy෸҅ᛔۖਖ਼ၞᰁ‫ڔ‬ഘ‫ک‬Remote proxy҅ଫአ෫ఽᎣ҅ ᚆ᫷ฃਫሿ჻ۖ‫܋‬ᕆ • ԁ෸ഭັLocal Proxyᳯ᷌҅‫ݢ‬ፗളਖ਼ၞᰁ‫کڔ‬Remote Proxy҅ᘒӧ୽ ߥӱ‫ۓ‬ 115
120. 116