王晓波-从微服务到Serverless+架构应用与实践

演讲大纲:
微服务应用坑点诉苦
serverless架构原理
改变了什么
serverless架构的应用场景

展开查看详情

1.՗ங๐‫کۓ‬Serverless ຝ຅ଫአӨਫ᪢ ሴปူ ‫ݶ‬ᑕᜏὄ

2.• ᘌாὄᰦጱங๐‫ۓ‬ଫአࣗᅩᦫᝒ • Serverless ຝ຅ܻቘ • ՗ங๐‫ۓ‬ຝ຅‫ک‬Serverlessຝ຅ද‫ݒ‬ԧՋԍ • Serverless ຝ຅ጱଫአ࣋ว

3.ຝ຅ᦡᦇጱᬦᑕғच๜ฎӞӻऴࣗӨ೵ࣗጱᬦᑕ ங๐‫ۓ‬ऴԧߺԶࣗҘ݈೵ԧߺԶࣗҘ

4.ᦏ౯ժ፡፡ॠॠᤩࡌጱփᕹᔮᕹຝ຅ DB Cache MQ սᅩ: ᇙᅩ: ୏‫ݎ‬ො‫׎‬ҁӞӷӻՈԞᚆ؉҂ ଫአग़ଙय़ਹ᮷ቘᥴ ᮱ᗟᓌ‫ܔ‬ҁ୏‫ݎ‬ᛔ૩ᬩᖌ҂ Ԟํᔋᔉଶጱ๐‫઀ۓ‬ሿ ୏‫ݎ‬ளҁ෫ᵱᥝचᏐԞᚆ؉҂ ೜ํӞਧጱᔮᕹ֐ᖽ௔ᚆ‫ێ‬ ᓕቘᓌ‫ܔ‬ҁӞՈӻᔮᕹ՗१‫ک‬ᚕ҂ ᯿ԧ໛ຝࢵ᫷ԧຝ຅ •

5.փᕹຝ຅ጱᗌᅩ Ӟӻਁ“Ԥ҅ӷӻਁ”ॡԤ“ ᳯ᷌ғ • ଫአी‫کے‬N‫܉‬ग़ӻ҅మӞమሻӧۖԧ • ၞᰁฎၹᰁྯॠහՊᕆ᧗࿢ᰁ • ܻ๶உᓌ‫ܔ‬ጱӞ‫ݙ‬SQL҅ሿࣁဌဩአԧ • ܻ๶ጱੜොဩ҅ሿࣁฎӡᤈጱդᎱ • ܻ๶ਫֺ۸᧣አӣ੶໛ຝ҅ሿࣁฎἋᜰ • ๐‫کے࢏ۓ‬ӧᎣ᭲න‫ߺک‬᯾অ • ‫ݱ‬ᐿᙧӧਠጱᲅ

6.ᮎԅՋԍሿࣁᬮํय़ᰁጱ‫ܔ‬ଫአࣁෛीޫҘ

7.ங๐‫ۓ‬ຝ຅ http/ws… • ള‫ݗ‬ጱᕹӞ • ਻Კ॒ቘҁᴴၞ̵ࢧᭅ̵ᵍᐶ̵ᆤ Gateway ෙ҂ http • ‫ق‬᱾᪠ጱ๐‫ۓ‬ፊഴ API API • ๐‫ဳۓ‬ٙ‫ݎ‬ሿ҅ഴ‫ګ‬๐‫ۓ‬ጱAPIහᰁ A B • ᕹӞդᎱ໛ຝ҅ඪ೮ग़ᐿᖫᑕ᧍᥺ • ๐‫ׁۓ‬ᩢ‫ى‬ᔮᓕቘ(๐‫ۓ‬ጱ‫ړ‬ᕆ) • ๐‫ۓ‬ጱCI/CD

8.ᗦᗦጱங๐‫ۓ‬လቘ୏তԧ WS Gateway http API API • य़ᰁጱӱ‫ۓ‬᭦ᬋդᎱ୏তᥴᘠ A B • ܻ๶य़᨝‫ݒ‬౮ԧӞӻӻ‫ৼܻݢ‬۸ጱ๐‫ۓ‬ • ྯӻ๐‫ۓ‬᮷‫ݢ‬զ‫ܔ‬ᇿ᮱ᗟ޾ᬩᖌ • ᧣አ‫ى‬ᔮԞႴศกԧ ) ( • ‫ݢ‬զ՗‫ܔ‬Ӟ᧍᥺‫ݻ‬java,nodeJS,GOग़᧍᥺୏‫ݎ‬ԧ ) HA ) ( HTTP

9.ԅՋԍங๐‫ۓ‬᩼‫ݒ‬᩼य़ • य़ᰁ๐‫ۓ‬զӱ‫ৼܻۓ‬ԅ‫҅ړښ֖ܔ‬ᔮᕹጱ‫ݒ‬۸ள҅๐‫ݒۓ‬౮य़ᙪৼ ᳯ᷌: ᶋ໐ஞ๐‫ۓ‬Ө໐ஞ๐‫ۓ‬๶ࢧ‫ݒ‬۸ ܻ๐‫ۓ‬ጱդᎱӧ඿දҁᑕଧާጱᇙ௔҅Ծߝጱᲅ҂ ๐‫ۓ‬ጱහᰁ౮‫׭֜پ‬ी႐ ։ங๐‫ۓ‬ጱ‫ڊ‬ሿҁங๐‫ۓ‬Ԟ‫ݒ‬ᙑԧ҅୮֦‫ݎ‬ሿ௛ฎࣁਙ‫ڊ‬ሿ‫ݸ‬҂ ෛଫአྲ᫾ग़ҁෛጱੜ‫֛ܔ‬ଫአ҅ᥝ᭛ଶᳩय़҂ Ջԍ໏ጱ๐‫ۓ‬ᓒங๐‫ۓ‬

10.ங๐‫ۓ‬ຝ຅ጱᗌᅩҁᡦ‫؃‬ጱਞਘ҂ ங๐‫ۓ‬ෆ֛വᬰฎᥝ෸ᳵ҅ӧ‫ݢ‬ᚆӞེදਠ҅Ӿᳵᬦᑕᵱ ᥝᬦჁ ᬮํஉग़ԅளଶ಑໏ጱ؉ጱ‫֛ܔ‬ଫአ҅౲ӞԶᓌ‫ܔ‬ଫአ Ӟӻங๐‫ۓ‬ᕪᬦᳩ෸ᳵᬽդๅෛ‫ݸ‬Ԟᵱᥝෛ᯿຅ ᳯ᷌: ෆӻ֛ᔮӾଚӧฎ‫ํݝ‬ங๐‫ۓ‬ ᓕቘ҅᧣አ᮷տࢩԅᬯӻӧ஑ӧ‫॔ݒ‬๥᩸๶ԧ ٟӞӻங๐‫ۓ‬ጱ౮๜Ԟଚӧੜ ୏‫ݎ‬ᬦᑕጱ᧣ᦶྲ᫾Ἃᅸ ๐‫ۓ‬ጱහᰁ᩼๶᩼ग़ᡱᆐ᪒ࣁDockerԏӤ֕Ԟฎᩒრ ։DEVOPS ங๐‫ۓ‬चᏐᦡෞᛔ૩ฎ‫ވ‬ங๐‫ۓ‬۸ԧ •

11.ங๐‫کۓ‬ବ੝ԧՋԍ ௛ᕮ᩸๶ᬯӞ‫ڔ‬੪ฎᛔ૪೵ӻࣗ޾ᛔ૪ٚऴӤࣗ ɠአӞӷӻੜ෸ٟӻ๐‫ۓ‬ଚӤᕚ ɡӧአ‫ى‬ஞ๐‫ߺࣁ࢏ۓ‬᮱ग़੝ ɢ‫ݝ‬ᵱᥝᯈᓕՈާጱᯈᗝളӥ๶੪ਠ‫ق‬ฎդᎱጱԪ ɣ୏‫ݎ‬Ոާ‫ݢ‬զ‫؟‬඙֢IDEᮎ໏ਠ౮՜ӧᆧఀጱದᚆ ɤդᎱဌ᪒๋অӧᥝᦇᓒᩒრ౮๜ ɥӧᵱᥝՈՈ᮷ฎ‫ق‬຾ૡᑕ૵҅՜੪మঅঅٟդᎱ ɦᬩᖌ੪ฎฬᚆጱ҅ᦏᔮᕹӨᓒဩ݄ᥴ٬ᳯ᷌

12.ٚ፡፡ॠॠࣁአጱᖫᑕ໛ຝො‫ހ׎‬Ҙ๐‫ۓ‬۸ԧ‫ހ‬Ҙ ‫ݱ‬ᐿᕟկ ‫ݱ‬ᐿᥢ‫ڞ‬ ‫ݱ‬ᐿᯈᗝ ই֜ਞਞᶉᶉጱٟդᎱҘҘҘ ‫ݱ‬ᐿૡᑕᕮ຅ AAEDEC B 8E CG 8 8 DRM Management Service Monitor SKY NET Service B E TurboMQ CG 8 CG 8 BC - ) BACE C BACE C ) ) -1 DD A /( AC A FC E A CCAC 8EACI / 8FC EI Archetype G E C EAC Configuration Center D - - ) ) 8 EAC Service RBAC TurboMQ TurboMQ ) ) INB Service Registry F E A E C BC A E C

13.ٚ፡፡ॠॠࣁٟጱդᎱ ፥ጱᕍӱ‫ۓ‬᭦ᬋ‫ހ‬ ፥ጱᚆᇿᒈ᮱ᗟ‫ހ‬ ᑕଧާଛᐰ‫ހ‬ҘҘҘ౯নғी҅‫ݷ‬ғ‫ਁ҅ے‬ғ᯿຅

14.ሾह҅໛ຝׁ҅ᩢ҅ॡᵙ൥ ᧣ᦶ҅௔ᚆ҅ਞ‫҅ق‬ॡ॔๥ • ‫ݱ‬ᐿሾहጱᕹӞ௔ • ‫ݱ‬ᐿ୏‫ݎ‬໛ຝጱᅸஞԪ • ‫ݱ‬ᐿ᧣አጱԤׁᩢ • դᎱզक़ᜰԧग़੝෸ᳵ • ୏‫๋ᦶ᧣ݎ‬ᅸ੒क़ׁᩢ • ௔ᚆஃஃ؉অ‫ݸ‬಍ᕡమ • ਞ‫ڊق‬ԧᳯ᷌಍౜ԧਙ • ӫӱᶾऒᬮํग़੝

15.᮱ᗟ҅ᬩᖌ҅ಘ਻҅ॡἋᅸ • ᮱ᗟࣁߺ҅ग़੝ਫֺ • ‫ݱ‬ᐿᯈᗝ҅Ӥᕚ҅ӥᕚ • ಘӻ਻‫ݱ‬ᐿ‫ဳى‬ᅩ • ፥ጱ‫ݢ‬զՈՈฎ‫ق‬຾‫ހ‬

16.Ӟ๵ SQL ‫ک‬Ӟӻ๐‫ۓ‬ጱ᪗ᐶ‫ک‬ବํग़ᬱ

17.ӞӻդᎱᚕ๜ᚆӧᚆ੪ฎӞӻங๐‫ۓ‬

18.Serverlessຝ຅ጱᕮ຅ E D ɠ੷ԭܻํचᏐ๐‫ۓ‬ ɡ‫ڥ‬አܻํ਻࢏ଘ‫ݣ‬ I ɢᵞ౮ᚆᵞ౮ጱӞ‫ڔ‬ AF W F P P P DB Cache MQ git

19.Serverlessຝ຅ጱᵍᐶ҅ᖫഭӨ᧣ଶ ବ੶਻࢏ᕆᵍᐶ ᧍Ԇᕆᵍᐶҁ᧍᥺VM҂ፓ‫ڹ‬౯ժ‫ݝ‬ඪ೮Node.Js޾LUA ᭗ᬦGatewayᦢᳯ‫ک‬ଫአ ໑ഝၞᰁᛔۖ೉᩸ଫአ޾ᛔۖಘ਻᮱ᗟਫֺ

20.Serverlessຝ຅ጱᩒრ‫ڥ‬አሲ ๋ੜ‫زܔ‬᮱ᗟ4‫ݣ‬ᇔቘ๐‫๋࢏ۓ‬ग़‫ݢ‬ඪ೮10ӡӻଫአ

21.ᖫᑕ໛ຝጱԯ۸SDK ᖫᑕSDK‫܋‬ᕆ෫ఽ ಅํֵአ࣐ԭդᎱොୗֵአ ֺғ՗ᦈ‫ܔ‬හഝପӾ೉‫ڊ‬හഝ Server.DB.Order.Get(“SELECT * FROM ORDER”)

22.Serverlessଘ‫ݣ‬:Ԫկᓕቘ ᇫா๢Ԫկ୚ක ଘ‫ݣ‬Ԫկ ᥶‫ݎ‬ ๐‫ۓ‬ ᥶‫ݎ‬Ԫկ ‫ݒ‬ๅ ‫ݒ‬ๅ‫ݸ‬Ԫկ A Event-A Event-B ๐‫ۓ‬ Ԫկ਻࢏ B ๜ࣈԪկ᫨ഘ ᇫாၾ௳ ‫૲ړ‬ୗԪ Q ๐‫ۓ‬ Ԫկፊ‫࢏ލ‬ C ӱ‫॒ۓ‬ቘ࢏ ӱ‫॒ۓ‬ቘ࢏ ӱ‫॒ۓ‬ቘ࢏ ๐‫ۓ‬ Actor Actor Actor D

23.Serverlessଘ‫ݣ‬:Gateway Serverless๐‫ۓ‬᨟ᑁᕆ‫ڦ‬ጱ୨௔ V V , S ಘ਻޾ᖽ਻ጱᚆ‫ێ‬ GJV e 6A Ro 6I d a 6I d l

24.Serverlessଘ‫ݣ‬:හഝ๐‫ۓ‬ᔮᕹ 1dS 4b 3 dS R s iqs l S R b n g M o 2 e Serverless๐‫ۓ‬೜ํᦢᳯଉᥢහഝრጱᚆ‫ێ‬

25.Serverlessଘ‫ݣ‬:ԯ۸IDE ෫๐‫࢏ۓ‬ຝ຅ӧᚆ‫ݝ‬ᥴ٬ᕚӤጱᳯ᷌ ୏‫ݎ‬ᬦᑕጱዳᝒๅग़ ਖ਼ಅํጱ‫ۑ‬ᚆ‫ݢ‬ᥤ۸,‫ݢ‬ᯈᗝ۸҅ӧٚᵱᥝ๜ࣈሾह҅ํग़੝ሾहӧٚᤩ‫ဳى‬

26.Serverlessғ୏‫޾૲ݎ̵ݎ‬ᬩᖌ ጱපሲ g 8 M i 4 C 0 V g + 0 i M + 9

27.౯ժ಩ՋԍනࣁServerlessଘ‫ݣ‬᪒ԧ

28.Serverlessࣁ‫ݶ‬ᑕጱఘ‫٭‬ғWebଫአ ಅํጱᗑᶭ ಅํጱၚۖവଠ ᮱‫ݒړ‬۸ᰁय़ጱ‫ݣݸ‬

29.Serverlessғ᫷ࣳ๐‫ۓ‬ ӞԶ᭦ᬋᓌ‫ܔ‬ጱӱ‫ۓ‬๐‫ۓ‬ ӞԶ᭦ᬋ‫ݒ‬۸ளጱӱ‫ۓ‬๐‫ۓ‬ य़ᰁጱԁ෸ጱੜ๐‫ۓ‬