"/>

閫氳繃杩?2寮犳墜缁樺浘锛屾悶鎳備粈涔堟槸寰湇鍔℃灦鏋?/h1>

Posted 绋嬪簭鐚緿D

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了閫氳繃杩?2寮犳墜缁樺浘锛屾悶鎳備粈涔堟槸寰湇鍔℃灦鏋?/h1>

相关的知识,希望对你有一定的参考价值。

鍥炲鈥?/span>璧勬簮鈥濊幏鍙栫嫭瀹舵暣鐞嗙殑瀛︿範璧勬枡锛?/span>


浣滆€?| tengshe789

鏉ユ簮 | juejin.im/post/5c0ba2bef265da614d08fefe

涓嬫枃锛屼綘灏嗙湅鍒颁笟鐣屼富娴佸井鏈嶅姟妗嗘灦鐨勬牳蹇冨師鐞嗭紝鍖呮嫭鏈嶅姟鍙戠幇锛岀綉鍏筹紝閰嶇疆涓績锛岀洃鎺х瓑缁勪欢锛屽姛鑳藉拰鏋舵瀯鍘熺悊鐨勭畝鍗曚粙缁嶃€傛劅璋㈤槄璇伙紒馃構

Hello锛孧icroservices

浠€涔堟槸寰湇鍔?/span>

寰湇鍔icroservices涔嬬埗锛岄┈涓?绂忓嫆锛屽寰湇鍔″ぇ姒傜殑姒傝堪濡備笅锛?/p>

灏辩洰鍓嶈€岃█锛屽浜庡井鏈嶅姟涓氱晫骞舵病鏈変竴涓粺涓€鐨勩€佹爣鍑嗙殑瀹氫箟锛圵hile there is no precise definition of this architectural style ) 銆備絾閫氬湪鍏跺父鑰岃█锛屽井鏈嶅姟鏋舵瀯鏄竴绉嶆灦鏋勬ā寮忔垨鑰呰鏄竴绉嶆灦鏋勯鏍硷紝瀹冩彁鍊″皢鍗曚竴搴旂敤绋嬪簭鍒掑垎鎴愪竴缁勫皬鐨勬湇鍔★紝姣忎釜鏈嶅姟杩愯鐙珛鐨勮嚜宸辩殑杩涚▼涓紝鏈嶅姟涔嬮棿浜掔浉鍗忚皟銆佷簰鐩搁厤鍚堬紝涓虹敤鎴锋彁渚涙渶缁堜环鍊笺€傛湇鍔′箣闂撮噰鐢ㄨ交閲忕骇鐨勯€氫俊鏈哄埗浜掔浉娌熼€氾紙閫氬父鏄熀浜?HTTP 鐨?RESTful API ) 銆傛瘡涓湇鍔¢兘鍥寸粫鐫€鍏蜂綋涓氬姟杩涜鏋勫缓锛屽苟涓旇兘澶熻鐙珛鍦伴儴缃插埌鐢熶骇鐜銆佺被鐢熶骇鐜绛夈€傚彟澶栵紝搴斿敖閲忛伩鍏嶇粺涓€鐨勩€侀泦涓紡鐨勬湇鍔$鐞嗘満鍒讹紝瀵瑰叿浣撶殑涓€涓湇鍔¤€岃█锛屽簲鏍规嵁涓氬姟涓婁笅鏂囷紝閫夋嫨鍚堥€傜殑璇█銆佸伐鍏峰鍏惰繘琛屾瀯寤猴紝鍙互鏈変竴涓潪甯歌交閲忕骇鐨勯泦涓紡绠$悊鏉ュ崗璋冭繖浜涙湇鍔°€傚彲浠ヤ娇鐢ㄤ笉鍚岀殑璇█鏉ョ紪鍐欐湇鍔★紝涔熷彲浠ヤ娇鐢ㄤ笉鍚岀殑鏁版嵁瀛樺偍銆?/p>

鏍规嵁椹竵.绂忓嫆鐨勬弿杩帮紝鎴戞€荤粨浜嗕竴涓嬪嚑鐐癸細

搴峰▉瀹氬緥

锛堝瓧宸紝鍕垮珜锛?/p>

灏忔湇鍔?/span>

灏忔湇鍔★紝娌℃湁鐗瑰畾鐨勬爣鍑嗘垨鑰呰鑼冿紝浣嗕粬鍦ㄦ€讳綋瑙勮寖涓婁竴瀹氭槸灏忕殑銆?/p>

杩涚▼鐙珛

姣忎竴缁勬湇鍔¢兘鏄嫭绔嬭繍琛岀殑锛屽彲鑳芥垜杩欎釜鏈嶅姟杩愯鍦?code class="mq-36">tomcat瀹瑰櫒锛岃€屽彟涓€涓湇鍔¤繍琛屽湪jetty涓娿€傚彲浠ラ€氳繃杩涚▼鏂瑰紡锛屼笉鏂殑妯悜鎵╁睍鏁翠釜鏈嶅姟銆?/p>

閫氫俊

杩囧幓鐨勫崗璁兘鏄緢閲嶇殑锛屽氨鍍廍SB锛屽氨鍍廠OAP锛岃交閫氫俊锛岀潃鎰忓懗鐫€鐩告瘮杩囧幓鏇存櫤鑳芥洿杞婚噺鐨勬湇鍔$浉浜掕皟鐢紝灏辨墍璋搒mart endpoints and dumb pipes锛岃繖浜沞ndpoint閮芥槸瑙h€︾殑锛屽畬鎴愪竴涓笟鍔¢€氫俊璋冪敤涓茶捣杩欎簺micro service灏卞儚鏄痩inux绯荤粺涓€氳繃绠¢亾涓茶捣涓€绯诲垪鍛戒护涓氬姟銆?/p>

杩囧幓鐨勪笟鍔★紝鎴戜滑閫氬父浼氳€冭檻鍚勭鍚勬牱鐨勪緷璧栧叧绯伙紝鑰冭檻绯荤粺鑰﹀悎甯︽潵鐨勯棶棰樸€傚井鏈嶅姟锛屽彲浠ヨ寮€鍙戣€呮洿涓撴敞浜庝笟鍔$殑閫昏緫寮€鍙戙€?/p>

閮ㄧ讲

涓嶆涓氬姟瑕佺嫭绔嬶紝閮ㄧ讲涔熻鐙珛銆備笉杩囪繖涔熸剰鍛崇潃锛屼紶缁熺殑寮€鍙戞祦绋嬩細鍑虹幇涓€瀹氱▼搴︾殑鏀瑰彉锛屽紑鍙戠殑閫傚悎涔熻鏈変竴瀹氱殑杩愮淮鎸囪矗

绠$悊

浼犵粺鐨勪紒涓氱骇SOA鏈嶅姟寰€寰€寰堝ぇ锛屼笉鏄撲簬绠$悊锛岃€﹀悎鎬ч珮锛屽洟闃熷紑鍙戞垚鏈瘮杈冨ぇ銆傚井鏈嶅姟锛屽彲浠ヨ鍥㈤槦鍚勬€濆叾鏀跨殑閫夋嫨鎶€鏈疄鐜帮紝涓嶅悓鐨剆ervice鍙互鏍规嵁鍚勮嚜鐨勯渶瑕侀€夋嫨涓嶅悓鐨勬妧鏈爤鏉ュ疄鐜板叾涓氬姟閫昏緫銆?/p>

寰湇鍔$殑鍒╀笌寮?/span>

涓轰粈涔堢敤寰湇鍔″憿锛熷洜涓哄ソ鐜╋紵

涓嶆槸鐨勩€備笅闈㈡槸鎴戜粠缃戠粶涓婃壘鍒拌鐨勬瘮杈冨叏鐨勪紭鐐癸細

  • 浼樼偣姣忎釜鏈嶅姟瓒冲鍐呰仛锛岃冻澶熷皬锛屼唬鐮佸鏄撶悊瑙h繖鏍疯兘鑱氱劍涓€涓寚瀹氱殑涓氬姟鍔熻兘鎴栦笟鍔¢渶姹?
  • 寮€鍙戠畝鍗曘€佸紑鍙戞晥鐜囨彁楂橈紝涓€涓湇鍔″彲鑳藉氨鏄笓涓€鐨勫彧骞蹭竴浠朵簨銆?
  • 寰湇鍔¤兘澶熻灏忓洟闃熷崟鐙紑鍙戯紝杩欎釜灏忓洟闃熸槸 2 鍒?5 浜虹殑寮€鍙戜汉鍛樼粍鎴愩€?
  • 寰湇鍔℃槸鏉捐棔鍚堢殑锛屾槸鏈夊姛鑳芥剰涔夌殑鏈嶅姟锛屾棤璁烘槸鍦ㄥ紑鍙戦樁娈垫垨閮ㄧ讲闃舵閮芥槸鐙珛鐨勩€?
  • 寰湇鍔¤兘浣跨敤涓嶅悓鐨勮瑷€寮€鍙戙€?
  • 鏄撲簬鍜岀涓夋柟闆嗘垚锛屽井鏈嶅姟鍏佽瀹规槗涓旂伒娲荤殑鏂瑰紡闆嗘垚鑷姩閮ㄧ讲锛岄€氳繃鎸佺画闆嗘垚宸ュ叿锛屽Jenkins,Hudson,bamboo銆?
  • 寰湇鍔℃槗浜庤涓€涓紑鍙戜汉鍛樼悊瑙o紝淇敼鍜岀淮鎶わ紝杩欐牱灏忓洟闃熻兘澶熸洿鍏虫敞鑷繁鐨勫伐浣滄垚鏋溿€傛棤闇€- - 閫氳繃鍚堜綔鎵嶈兘浣撶幇浠峰€笺€傚井鏈嶅姟鍏佽浣犲埄鐢ㄨ瀺鍚堟渶鏂版妧鏈€?
  • 寰湇鍔″彧鏄笟鍔¢€昏緫鐨勪唬鐮侊紝涓嶄細鍜?html,CSS鎴栧叾浠栫晫闈㈢粍浠舵贩鍚堛€?
  • 姣忎釜寰湇鍔¢兘鏈夎嚜宸辩殑瀛樺偍鑳藉姏锛屽彲浠ユ湁鑷繁鐨勬暟鎹簱銆備篃鍙互鏈夌粺涓€鏁版嵁搴撱€?

鎬荤殑鏉ヨ锛屽井鏈嶅姟鐨勪紭鍔匡紝灏辨槸鍦ㄤ簬锛岄潰瀵瑰ぇ鐨勭郴缁燂紝鍙互鏈夋晥鐨勫噺灏戝鏉傜▼搴︼紝浣挎湇鍔℃灦鏋勭殑閫昏緫鏇存竻鏅版槑浜嗐€?/p>

浣嗘槸杩欐牱涔熶細甯︽潵寰堝闂锛屽氨璀鍒嗗竷寮忕幆澧冧笅鐨勬暟鎹竴鑷存€э紝娴嬭瘯鐨勫鏉傛€э紝杩愮淮鐨勫鏉傛€с€?/p>

浠€涔堢粍缁囬€傚悎浣跨敤寰湇鍔★紵

寰湇鍔″甫浜嗙绉嶄紭鐐癸紝绉嶇寮婄锛岄偅涔堜粈涔堢粍缁囬€傚悎浣跨敤寰湇鍔★紵

澧ㄨ彶瀹氬緥锛堣璁$郴缁燂級鍜屽悍濞佸畾寰嬶紙绯荤粺鍒掑垎锛?/span>

搴峰▉瀹氬緥锛屾槸涓€涓簲鍗佸骞村墠灏辫鎻愬嚭鏉ョ殑寰湇鍔℃蹇点€傚湪搴峰▉鐨勮繖绡囨枃绔犱腑锛屾渶鏈夊悕鐨勪竴鍙ヨ瘽灏辨槸锛?/p>

Organizations which design systems are constrained to produce designs which are copies of the communication structures of these organizations. - Melvin Conway(1967)

涓枃鐩磋瘧澶ф鐨勬剰鎬濆氨鏄細璁捐绯荤粺鐨勭粍缁囷紝鍏朵骇鐢熺殑璁捐绛夊悓浜庣粍缁囦箣鍐呫€佺粍缁囦箣闂寸殑娌熼€氱粨鏋勩€傜湅鐪嬩笅闈㈢殑鍥剧墖锛堟潵婧愪簬浜掕仈缃戯紝渚靛垹锛夛紝鍐嶆兂鎯矨pple鐨勪骇鍝併€佸井杞殑浜у搧璁捐锛屽氨鑳藉舰璞$敓鍔ㄧ殑鐞嗚В杩欏彞璇濄€?/p>

搴峰▉瀹氬緥

鎰熷叴瓒g殑鍚勪綅鍙互鐮旂┒涓€涓?/p>

鏋舵瀯婕斿寲

鏋舵瀯鏄笉鏂紨鍖栧嚭鏉ョ殑锛屽井鏈嶅姟涔熸槸杩欐牱锛屽綋浠庡悇澶х鎶€鍏徃锛岃妯″ぇ鍒颁竴瀹氱▼搴︼紝瀹屽叏闇€瑕佹紨鍖栨垚鏇磋繘涓€姝ョ鐞嗙殑鎶€鏈灦鏋勪綋绯汇€?/p>

搴峰▉瀹氬緥

锛堝瓧宸紝鍕垮珜锛?/p>

浼犵粺鐨勫洟闃燂紝閮芥槸闈㈠悜杩囩▼鍖栫殑锛屼骇鍝佹兂瀹屼簡鍘绘壘绛栧垝锛岀瓥鍒掑畬浜嗘壘寮€鍙戯紝鎺ョ潃椤虹潃涓€姝ヤ竴姝ユ壘銆傛垜浠仛鎶€鏈兘鏄负浜嗕骇鍝佺殑锛屼竴鏃﹁繃绋嬪嚭鏉ヤ簡浠€涔堥棶棰橈紝鍥炴函瀵绘壘闂浼氶潪甯歌€楁椂銆?/p>

搴峰▉瀹氬緥

锛堝瓧宸紝鍕垮珜锛?/p>

浣跨敤浜嗗井鏈嶅姟鏋舵瀯浣撶郴锛屽洟闃熺粍缁囨柟寮忛渶瑕佽浆鍙樻垚璺ㄨ亴鑳藉洟闃燂紝鍗虫瘡涓洟闃熼兘鏈変骇鍝佷笓瀹讹紝绛栧垝涓撳锛屽紑鍙戜笓瀹讹紝杩愮淮涓撳锛屼粬浠娇鐢ˋPI鏂瑰紡鍙戝竷浠栦滑鐨勫姛鑳斤紝鑰屽钩鍙颁娇鐢ㄤ粬浠殑鍔熻兘鍙戝竷浜у搧

DevOps
devops

寰湇鍔℃妧鏈灦鏋勪綋绯?/span>

涓嬮潰鎴戝垎浜竴涓嬪ぇ閮ㄥ垎鍏徃閮戒娇鐢ㄧ殑寰湇鍔℃妧鏈灦鏋勪綋绯汇€?/p>

搴峰▉瀹氬緥

锛堝浘宸紝鍕垮珜锛?/p>

鏈嶅姟鍙戠幇

涓绘祦鐨勬湇鍔″彂鐜帮紝鍒嗕负涓夌

搴峰▉瀹氬緥

绗竴绉嶏紝寮€鍙戜汉鍛樺紑鍙戜簡绋嬪簭浠ュ悗锛屼細鎵捐繍缁撮厤涓€涓煙鍚嶏紝鏈嶅姟鐨勮瘽閫氳繃dns灏辫兘鎵惧埌鎴戜滑瀵瑰簲鐨勬湇鍔?/p>

缂虹偣鏄紝鐢变簬鏈嶅姟娌℃湁璐熻浇鍧囪 鍔熻兘锛屽璐熻浇鍧囪 鏈嶅姟锛屽彲鑳戒細鏈夌浉褰撳ぇ鐨勬€ц兘闂銆?/p>

搴峰▉瀹氬緥

绗簩绉嶏紝鏄洰鍓嶆櫘閬嶇殑鍋氭硶銆傚彲浠ュ弬鑰冩垜涓婄瘒鍗氬鍒嗘瀽鐨剒uul缃戝叧锛屾瘡涓€涓湇鍔¢兘閫氳繃鏈嶅姟绔唴缃殑鍔熻兘娉ㄥ唽鍒版敞鍐屼腑蹇冿紝鏈嶅姟娑堣垂鑰呬笉鏂疆璇㈡敞鍐屼腑蹇冨彂鐜板搴旂殑鏈嶅姟锛屼娇鐢ㄥ唴缃礋杞藉潎琛¤皟鐢ㄦ湇鍔°€?/p>

缂虹偣鏄紝瀵瑰璇█鐜涓嶆槸寰堝ソ锛屼綘闇€瑕佸崟鐙粰娑堣垂鑰呯殑瀹㈡埛绔紑鍙戞湇鍔″彂鐜板拰璐熻浇鍧囪 鍔熻兘銆傚綋鐒朵簡锛岃繖涓柟娉曢€氬父閮芥槸鐢ㄥ湪spring cloud涓婄殑銆?/p>

搴峰▉瀹氬緥

绗笁绉嶏紝鏄皢瀹㈡埛绔拰璐熻浇鍧囪 鏀惧湪鍚屼竴涓富鏈猴紝鑰屼笉鏄悓涓€涓繘绋嬪唴銆?/p>

杩欑鏂规硶鐩稿绗竴绉嶇浜岀鏂规硶鏉ヨ锛屾敼鍠勪簡浠栦滑鐨勭己鐐癸紝浣嗘槸浼氭瀬澶у鍔犺繍缁存垚鏈€?/p>

缃戝叧

寰湇鍔$殑缃戝叧鏄粈涔堬紵

鎴戜滑鍙互鑱旂郴鐢熸椿瀹為檯鎯充竴涓嬨€傛瘡涓€涓ぇ鐨勫叕鍙革紝閮戒細鏈変竴鍋忓睘浜庤嚜宸辩殑寤虹瓚鍖猴紝鑰岃繖寤虹瓚鍖哄唴锛岄兘鏈変笉灏戠殑闂ㄥ崼銆傚鏋滄湁澶栨潵浜哄憳杩涘叆鍏徃锛屼細鍏堝拰闂ㄥ崼鎵撳ソ鎷涘懠锛屾墠鑳借繘鍘汇€?/p>

灏嗙敓娲诲疄闄呰仈绯诲埌寰湇鍔′笂锛屽氨涓嶉毦鐞嗚В缃戝叧鐨勬剰鎬濅簡銆?/p>

缃戝叧鏈変粈涔堢敤

搴峰▉瀹氬緥
  • 鍙嶅悜璺敱锛氬緢澶氭椂鍊欙紝鍏徃涓嶆兂璁╁閮ㄤ汉鍛樼湅鍒版垜浠叕鍙哥殑鍐呴儴锛屽氨闇€瑕佺綉鍏虫潵杩涜鍙嶅悜璺敱銆傚嵆灏嗗閮ㄨ姹傝浆鎹㈡垚鍐呴儴鍏蜂綋鏈嶅姟鏉$敤
  • 瀹夊叏璁よ瘉锛氱綉缁滀腑浼氭湁寰堝鎭舵剰璁块棶锛岃濡傜埇铏紝璀榛戝鏀诲嚮锛岀綉鍏崇淮鎶ゅ畨鍏ㄥ姛鑳姐€?
  • 闄愭祦鐔旀柇锛氬弬鑰冩垜瀛﹀ソ鍒嗗竷寮弞ookepper鐨勫崥瀹紝褰撹姹傚緢澶氭湇鍔′笉鍫噸璐燂紝浼氳鎴戜滑鐨勬湇鍔¤嚜鍔ㄥ叧闂紝瀵艰嚧涓嶈兘鐢ㄦ湇鍔°€傞檺娴佺啍鏂彲浠ユ湁鏁堢殑閬垮厤杩欑被闂
  • 鏃ュ織鐩戞帶锛氭墍鏈夌殑澶栭潰鐨勮姹傞兘浼氱粡杩囩綉鍏筹紝杩欐牱鎴戜滑灏卞彲浠ヤ娇鐢ㄧ綉鍏虫潵璁板綍鏃ュ織淇℃伅
  • 鐏板害鍙戝竷锛岃摑缁块儴缃层€傛槸鎸囪兘澶熷钩婊戣繃娓$殑涓€绉嶅彂甯冩柟寮忋€傚湪鍏朵笂鍙互杩涜A/B testing锛屽嵆璁╀竴閮ㄥ垎鐢ㄦ埛缁х画鐢ㄤ骇鍝佺壒鎬锛屼竴閮ㄥ垎鐢ㄦ埛寮€濮嬬敤浜у搧鐗规€锛屽鏋滅敤鎴峰B娌℃湁浠€涔堝弽瀵规剰瑙侊紝閭d箞閫愭鎵╁ぇ鑼冨洿锛屾妸鎵€鏈夌敤鎴烽兘杩佺Щ鍒癇涓婇潰鏉ャ€?

寮€婧愮綉鍏砕uul鏋舵瀯

zuul鏋舵瀯

zuul缃戝叧鏍稿績鍏跺疄鏄竴涓?code class="mq-136">servlet锛屾墍鏈夎姹傞兘浼氱粡杩?code class="mq-137">zuul servlet浼犲埌zuulFilter Runner锛岀劧鍚庡垎鍙戝埌涓夌杩囨护鍣ㄣ€?/p>

鍏堣璇存灦鏋勫浘宸﹀崐閮ㄥ垎锛屽垎鍒槸浣跨敤Groovy瀹炵幇鐨勫墠缃矾鐢辫繃婊ゅ櫒锛岃矾鐢辫繃婊ゅ櫒锛屽悗缃矾鐢辫繃婊ゅ櫒銆?/p>

涓€鑸姹傞兘浼氬厛缁忚繃鍓嶇疆璺敱杩囨护鍣?/strong>澶勭悊锛屼竴鑸殑鑷畾涔塲ava灏佽閫昏緫涔熶細鍦ㄨ繖閲屽疄鐜般€?/p>

璺敱杩囨护鍣?/strong>锛屽疄鐜扮殑鏄壘鍒板搴旂殑寰湇鍔¤繘琛岃皟鐢ㄣ€?/p>

璋冪敤瀹屼簡锛屽搷搴斿洖鏉ワ紝浼氱粡杩?span class="mq-146">鍚庣疆璺敱杩囨护鍣?/strong>锛岄€氳繃鍚庣疆璺敱杩囨护鍣ㄦ垜浠彲浠ュ皝瑁呮棩蹇楀璁$殑澶勭悊銆?/p>

鍙互璇?code class="mq-148">zuul缃戝叧鏈€澶х殑鐗硅壊灏辨槸瀹冧笁灞傝繃婊ゅ櫒銆?/p>

鏋舵瀯鍥惧彸鍗婇儴鍒嗭紝鏄?code class="mq-150">zuul缃戝叧璁捐鐨勮嚜瀹氫箟杩囨护鍣ㄥ姞杞芥満鍒躲€傜綉鍏冲唴閮ㄤ細鏈夌敓浜ц€呮秷璐硅€呮ā鍨嬶紝鑷姩鐨勫皢杩囨护鍣ㄨ剼鏈彂甯冨埌zuul缃戝叧璇诲彇鍔犺浇杩愯銆?/p>

閰嶇疆涓績

浠ュ墠锛屽紑鍙戜汉鍛樻妸閰嶇疆鏂囦欢鏀惧湪寮€鍙戞枃浠堕噷闈紝杩欐牱浼氭湁寰堝闅愭偅銆傝濡傦紝閰嶇疆瑙勮寖涓嶅悓锛屾棤娉曡拷婧厤缃汉鍛樸€備竴鏃﹂渶瑕佸ぇ瑙勬ā鏀瑰姩閰嶇疆锛屾敼鍔ㄦ椂闂翠細寰堥暱锛屾棤娉曡拷婧厤缃汉鍛橈紝浠庤€屽奖鍝嶆暣涓骇鍝侊紝鍚庢灉鏄垜浠壙鎷呬笉璧风殑銆?/p>

鍥犳灏辨湁閰嶇疆涓績杩欎釜鍠絶

鐜板湪鐨勫紑婧愪腑蹇冩湁鐧惧害閰嶇疆涓績 Disconf锛宻pring cloud config锛孉pollo锛屼粖澶╅噸鐐硅璇寸幇鍦ㄥ簲鐢ㄨ川閲忎笉閿欑殑閰嶇疆涓績闃挎尝缃椼€?/p>

鎼虹▼寮€婧愮殑Apollo

搴峰▉瀹氬緥

apollo鐨勯厤缃腑蹇冭妯℃瘮杈冨ぇ锛屾湰鍦板簲鐢ㄤ細鏈夊搷搴旂殑閰嶇疆涓績瀹㈡埛绔紝鍙互瀹氭椂鍚屾閰嶇疆涓績閲岀殑閰嶇疆銆傚鏋滈厤缃腑蹇冩€犳満锛屼細浣跨敤缂撳瓨鏉ヨ繘琛岄厤缃€?/p>

閫氳鏂瑰紡

鍏充簬閫氳鏂瑰紡锛屼竴鑸競闈篃灏辨槸涓ょ杩滅▼璋冪敤鏂瑰紡锛屾垜鏁寸悊浜嗕竴涓〃鏍硷細


RPC REST
鑰﹀悎鎬?/td> 寮鸿€﹀悎 鏉炬暎鑰﹀悎
娑堟伅鍗忚 TCP HTTP
閫氳鍗忚 浜岃繘鍒?/td> 鏂囨湰XML锛孞son
鎬ц兘 楂?/td> 浣庝簬RPC
鎺ュ彛濂戠害IDL thrift,protobuf,IdL Swagger
瀹㈡埛绔?/td> 寮虹被鍨嬪鎴风锛屼竴鑸嚜鍔ㄧ敓鎴?/td> 涓€鑸琀TTP鍙闂紝鐢熸垚寮虹被鍨嬪鎴风锛屽璇█鏀寔濂?/td>
妗堜緥 Dubbo锛孌ubbox,motan,tars,grpc,thrift spring boot,tax-rs,dropwizard
寮€鍙戣€呭弸濂?/td> 瀹㈡埛绔瘮杈冩柟闈紝浜岃繘鍒舵秷鎭笉鑳借 鍙娑堟伅
瀵瑰寮€鏀?/td> 涓€鑸渶瑕佽浆鎴怰EST/鏂囨湰鍗忚 鍙洿鎺ュ澶栧紑鍙?/td>

鐩戞帶棰勮

鐩戞帶棰勮瀵逛簬寰湇鍔″緢閲嶈锛屼竴涓彲闈犵殑鐩戞帶棰勮浣撶郴瀵瑰井鏈嶅姟杩愯鑷冲叧閲嶈銆備竴鑸洃鎺у垎涓哄涓嬪眰娆★細

搴峰▉瀹氬緥

浠庡熀纭€璁炬柦鍒扮敤鎴风锛屽眰灞傛湁鐩戞帶锛屽叏鏂逛綅锛屽瑙掑害锛屾瘡涓€涓眰闈㈤兘寰堥噸瑕併€傛€讳綋鏉ヨ锛屽井鏈嶅姟鍙垎5涓洃鎺х偣锛?span class="mq-215">鏃ュ織鐩戞帶锛?span class="mq-216">Metrics鐩戞帶锛?span class="mq-217">鍋ュ悍妫€鏌?/strong>锛?span class="mq-218">璋冪敤閾炬鏌?/strong>锛?span class="mq-219">鍛婅绯荤粺

鐩戞帶鏋舵瀯

涓嬮潰鐨勫浘鏄ぇ閮ㄥ垎鍏徃鐨勪竴绉嶇洃鎺ф灦鏋勫浘銆傛瘡涓€涓湇鍔¢兘鏈変竴涓?code class="mq-223">agent锛?code class="mq-224">agent鏀堕泦鍒板叧閿俊鎭紝浼氫紶鍒颁竴浜?em class="mq-225">MQ涓紝涓轰簡瑙h€︺€傚悓鏃跺皢鏃ュ織浼犲叆ELK锛屽皢Metrics浼犲叆InfluxDB鏃堕棿搴忓垪搴撱€傝€屽儚nagios锛屽彲浠ュ畾鏈熷悜agent鍙戣捣淇℃伅妫€鏌ュ井鏈嶅姟銆?/p>

搴峰▉瀹氬緥

璋冪敤閾剧洃鎺PM

寰堝鍏徃閮芥湁璋冪敤閾剧洃鎺э紝灏辫濡傞樋閲屾湁楣扮溂鐩戞帶锛岀偣璇勭殑Cat锛屽ぇ閮ㄥ垎璋冪敤閾剧洃鎺э紙娌¢敊锛屾垜鎸囩殑Zipkin锛夋灦鏋勬槸杩欐牱鐨勷煈?/p>

搴峰▉瀹氬緥

褰撹姹傝繘鍏eb瀹瑰櫒鐨勬椂鍊欙紝浼氱粡杩囧垱寤?code class="mq-240">Tracer锛岃繛鎺?code class="mq-241">spans锛堟ā鎷熸綔鍦ㄧ殑鍒嗗竷寮忓伐浣滅殑寤惰繜锛岃妯″潡杩樺寘鍚湪绯荤粺缃戠粶闂翠紶閫掕窡韪笂涓嬫枃淇℃伅鐨勫伐鍏峰寘锛屽閫氳繃http headers锛夈€?code class="mq-242">Spans鏈変竴涓笂涓嬫枃锛屽叾涓寘鍚?code class="mq-243">tracer鏍囪瘑绗︼紝灏嗗叾鏀惧湪琛ㄧず鍒嗗竷寮忔搷浣滅殑鏍戠殑姝g‘浣嶇疆銆傚綋鎴戜滑鎶婂浘涓殑鍚勭span鏀惧埌鍚庣鐨勬椂鍊欙紝鎴戜滑鐨勬湇鍔¤皟鐢ㄩ摼浼氬姩鎬佺殑鐢熸垚璋冪敤閾俱€?/p>

涓嬮潰鏄竴浜涘競鍦轰笂鐢ㄧ殑姣旇緝澶氱殑璋冪敤閾剧洃鎺э細

搴峰▉瀹氬緥

鐔旀柇銆侀殧绂汇€侀檺娴併€侀檷绾?/span>

闈㈠宸ㄥぇ鐨勭獊鍙戞祦閲忎笅锛屽ぇ鍨嬪叕鍙镐竴鑸細閲囩敤涓€绯诲垪鐨?span class="mq-250">鐔旀柇锛堢郴缁熻嚜鍔ㄥ皢鏈嶅姟鍏抽棴闃叉璁╁嚭鐜扮殑闂鏈€澶у寲锛夈€?span class="mq-251">闅旂锛堝皢鏈嶅姟鍜屾湇鍔¢殧绂伙紝闃叉涓€涓湇鍔℃寕浜嗗叾浠栨湇鍔′笉鑳借闂級銆?span class="mq-252">闄愭祦锛堝崟浣嶆椂闂村唴涔嬪厑璁镐竴瀹氭暟閲忕敤鎴疯闂級銆?span class="mq-253">闄嶇骇锛堝綋鏁翠釜寰湇鍔℃灦鏋勬暣浣撶殑璐熻浇瓒呭嚭浜嗛璁剧殑涓婇檺闃堝€兼垨鍗冲皢鍒版潵鐨勬祦閲忛璁″皢浼氳秴杩囬璁剧殑闃堝€兼椂锛屼负浜嗕繚璇侀噸瑕佹垨鍩烘湰鐨勬湇鍔¤兘姝e父杩愯锛屾垜浠彲浠ュ皢涓€浜?涓嶉噸瑕佹垨 涓嶇揣鎬?鐨勬湇鍔℃垨浠诲姟杩涜鏈嶅姟鐨?寤惰繜浣跨敤 鎴?鏆傚仠浣跨敤锛夋帾鏂姐€?/p>

涓嬮潰浠嬬粛涓€涓?code class="mq-255">hystrix鐨勮繍琛屾祦绋嬶紙娌℃壘鍒版灦鏋勫浘涓嶅ソ鎰忔€濓級锛?/p>

hystrix

姣忎竴涓井鏈嶅姟璋冪敤鏃讹紝閮戒細浣跨敤hystrix鐨?code class="mq-260">command鏂瑰紡锛堜笂鍥剧殑宸︿笂瑙掗偅涓級锛岀劧鍚庝娇鐢?code class="mq-261">command鍚屾鐨?/em>锛屾垨鑰呮槸鍝嶅簲寮忕殑锛屾垨鑰呮槸寮傛鐨?/em>锛屽垽鏂數璺槸鍚︾啍鏂紙椤虹潃鍥句粠宸﹀線鍙崇湅锛夛紝

濡傛灉鏂矾鍒欒蛋闄嶇骇fallback锛?/p>

濡傛灉杩欎釜绾块棴鍚堢潃锛屼絾鏄嚎绋嬭祫婧愭病浜嗭紝闃熷垪婊′簡锛屽垯璧伴檺娴佹帾鏂斤紙鐪嬪浘鐨勭5姝ワ級锛?/p>

濡傛灉璧板畬浜嗭紝鎵ц鎴愬姛浜嗭紝鍒欒蛋run()鏂规硶锛岃幏鍙杛esponse锛屼絾鏄繖涓繃绋嬪鏋滃嚭閿欎簡锛屽垯缁х画璧伴檷绾allback.

鍚屾椂锛岀湅鍥炬渶涓婇潰鏈変竴涓悗缂€鏄?code class="mq-269">health鐨勶紝杩欐槸涓€涓绠楁暣涓摼璺槸鍚﹀仴搴风殑缁勪欢锛屾瘡涓€姝ユ搷浣滈兘琚畠璁板綍鐫€銆?/p>

瀹瑰櫒涓庢湇鍔$紪鎺掑紩鎿?/span>

浠庣墿鐞嗘満鍒拌櫄鎷熸満锛屼粠铏氭嫙鏈哄埌瀹瑰櫒锛涗粠鐗╃悊闆嗙兢鍒?code class="mq-273">open stack锛?code class="mq-274">open stack鍒?code class="mq-275">kubernetes锛涚鎶€涓嶆柇鐨勫彉鍖栵紝鎴戜滑鐨勮鐭ヤ篃娌″埛鏂般€?/p>

鎴戜滑浠庡鍣ㄥ紑濮嬭璧凤紝瀹冮鍏堟槸涓€涓浉瀵圭嫭绔嬬殑杩愯鐜锛屽湪杩欎竴鐐规湁鐐圭被浼间簬铏氭嫙鏈猴紝浣嗘槸涓嶅儚铏氭嫙鏈洪偅鏍峰交搴曘€傗€冭櫄鎷熸満浼氬皢铏氭嫙纭欢銆佸唴鏍革紙鍗虫搷浣滅郴缁燂級浠ュ強鐢ㄦ埛绌洪棿鎵撳寘鍦ㄦ柊铏氭嫙鏈哄綋涓紝铏氭嫙鏈鸿兘澶熷埄鐢ㄢ€滆櫄鎷熸満绠$悊绋嬪簭鈥濊繍琛屽湪鐗╃悊璁惧涔嬩笂銆傝櫄鎷熸満渚濊禆浜巋ypervisor锛屽叾閫氬父琚畨瑁呭湪鈥滆8閲戝睘鈥濈郴缁熺‖浠朵箣涓婏紝杩欏鑷磆ypervisor鍦ㄦ煇浜涙柟闈㈣璁や负鏄竴绉嶆搷浣滅郴缁熴€備竴鏃?hypervisor瀹夎瀹屾垚锛?灏卞彲浠ヤ粠绯荤粺鍙敤璁$畻璧勬簮褰撲腑鍒嗛厤铏氭嫙鏈哄疄渚嬩簡锛屾瘡鍙拌櫄鎷熸満閮借兘澶熻幏寰楀敮涓€鐨勬搷浣滅郴缁熷拰璐熻浇(搴旂敤绋嬪簭)銆傜畝瑷€涔嬶紝铏氭嫙鏈哄厛闇€瑕佽櫄鎷熶竴涓墿鐞嗙幆澧冿紝鐒跺悗鏋勫缓涓€涓畬鏁寸殑鎿嶄綔绯荤粺锛屽啀鎼缓涓€灞俁untime锛岀劧鍚庝緵搴旂敤绋嬪簭杩愯銆傗€?鈥?瀵逛簬瀹瑰櫒鐜鏉ヨ锛屼笉闇€瑕佸畨瑁呬富鏈烘搷浣滅郴缁燂紝鐩存帴灏嗗鍣ㄥ眰(姣斿LXC鎴杔ibcontainer)瀹夎鍦ㄤ富鏈烘搷浣滅郴缁?閫氬父鏄疞inux鍙樼)涔嬩笂銆傚湪瀹夎瀹屽鍣ㄥ眰涔嬪悗锛屽氨鍙互浠庣郴缁熷彲鐢ㄨ绠楄祫婧愬綋涓垎閰嶅鍣ㄥ疄渚嬩簡锛屽苟涓斾紒涓氬簲鐢ㄥ彲浠ヨ閮ㄧ讲鍦ㄥ鍣ㄥ綋涓€備絾鏄紝姣忎釜瀹瑰櫒鍖栧簲鐢ㄩ兘浼氬叡浜浉鍚岀殑鎿嶄綔绯荤粺(鍗曚釜涓绘満鎿嶄綔绯荤粺)銆傚鍣ㄥ彲浠ョ湅鎴愪竴涓濂戒簡涓€缁勭壒瀹氬簲鐢ㄧ殑铏氭嫙鏈猴紝瀹冪洿鎺ュ埄鐢ㄤ簡瀹夸富鏈虹殑鍐呮牳锛屾娊璞″眰姣旇櫄鎷熸満鏇村皯锛屾洿鍔犺交閲忓寲锛屽惎鍔ㄩ€熷害鏋佸揩銆?/p>

鐩告瘮浜庤櫄鎷熸満锛屽鍣ㄦ嫢鏈夋洿楂樼殑璧勬簮浣跨敤鏁堢巼锛屽洜涓哄畠骞朵笉闇€瑕佷负姣忎釜搴旂敤鍒嗛厤鍗曠嫭鐨勬搷浣滅郴缁熲€斺€斿疄渚嬭妯℃洿灏忋€佸垱寤哄拰杩佺Щ閫熷害涔熸洿蹇€傝繖鎰忓懗鐩告瘮浜庤櫄鎷熸満锛屽崟涓搷浣滅郴缁熻兘澶熸壙杞芥洿澶氱殑瀹瑰櫒銆備簯鎻愪緵鍟嗗崄鍒嗙儹琛蜂簬瀹瑰櫒鎶€鏈紝鍥犱负鍦ㄧ浉鍚岀殑纭欢璁惧褰撲腑锛屽彲浠ラ儴缃叉暟閲忔洿澶氱殑瀹瑰櫒瀹炰緥銆傛澶栵紝瀹瑰櫒鏄撲簬杩佺Щ锛屼絾鏄彧鑳借杩佺Щ鍒板叿鏈夊吋瀹规搷浣滅郴缁熷唴鏍哥殑鍏朵粬鏈嶅姟鍣ㄥ綋涓紝杩欐牱灏变細缁欒縼绉婚€夋嫨甯︽潵闄愬埗銆傚洜涓哄鍣ㄤ笉鍍忚櫄鎷熸満閭f牱鍚屾牱瀵瑰唴鏍告垨鑰呰櫄鎷熺‖浠惰繘琛屾墦鍖咃紝鎵€浠ユ瘡濂楀鍣ㄩ兘鎷ユ湁鑷繁鐨勯殧绂诲寲鐢ㄦ埛绌洪棿锛屼粠鑰屼娇寰楀濂楀鍣ㄨ兘澶熻繍琛屽湪鍚屼竴涓绘満绯荤粺涔嬩笂銆傛垜浠彲浠ョ湅鍒板叏閮ㄦ搷浣滅郴缁熷眰绾х殑鏋舵瀯閮藉彲瀹炵幇璺ㄥ鍣ㄥ叡浜紝鎯熶竴闇€瑕佺嫭绔嬫瀯寤虹殑灏辨槸浜岃繘鍒舵枃浠朵笌搴撱€傛鍥犱负濡傛锛屽鍣ㄦ墠鎷ユ湁鏋佷负鍑鸿壊鐨勮交閲忓寲鐗规€с€?/p>

鎴戜滑鏈€甯哥敤鐨勫鍣ㄦ槸daocker锛岀綉鍧€濡備笅馃憠https://www.docker.com/

瀹瑰櫒缂栨帓

杩囧幓铏氭嫙鏈哄彲浠ラ€氳繃浜戝钩鍙?code class="mq-282">open stack绠$悊铏氭嫙鍖栵紝瀹瑰櫒鏃朵唬濡備綍绠$悊瀹瑰櫒鍛紵杩欏氨瑕佺湅鐪嬪鍣ㄧ紪鎺掑紩鎿庝簡銆?/p>

Apache mesos

mesos鏄熀浜巑aster锛宻lave鏋舵瀯锛屾鏋跺喅瀹氬浣曞埄鐢ㄨ祫婧愶紝master璐熻矗绠$悊鏈哄櫒锛宻lave浼氬畾鏈熺殑灏嗘満鍣ㄦ儏鍐垫姤鍛婄粰master锛宮aster鍐嶅皢淇℃伅缁欐鏋躲€俶aster鏄珮鍙敤鐨勶紝鍥犱负zk锛屼篃鏈塴eader鐨勫瓨鍦ㄣ€備笅闈㈡槸鏋舵瀯鍥攫煈?/p>

1544264985310

kubernetes

kubernetes鏄渶杩戝崄鍒嗙伀鐑殑寮€婧愬鍣ㄧ紪鎺掑紩鎿庯紝鍏蜂綋鍙互鍙傝€僰ubernetes涓枃鏂囨。

k8s

Kubernetes璁捐鐞嗗康鍜屽姛鑳藉叾瀹炲氨鏄竴涓被浼糒inux鐨勫垎灞傛灦鏋勶紝鍏堣璇存瘡涓€涓狵ubernetes鑺傜偣鍐呴儴锛宬ubelet绠$悊鍏ㄥ眬鍏ㄥ眬pod锛岃€屾瘡涓€涓猵od鎵胯浇鐫€涓€涓垨澶氫釜瀹瑰櫒锛宬ube-proxy璐熻矗缃戠粶浠g悊鍜岃礋杞藉潎琛?銆?/p>

Kubernetes鑺傜偣澶栭儴锛屽垯鏄搴旂殑鎺у埗绠$悊鏈嶅姟鍣紝璐熻矗缁熶竴绠$悊鍚勪釜鑺傜偣璋冨害鍒嗛厤涓庤繍琛屻€?/p>

鏈嶅姟缃戞牸鍖?/span>

銆傘€傘€傚緟鏇存柊

璧勬枡涓庢枃鐚?/span>

椹竵.绂忓嫆瀵瑰井鏈嶅姟鐨勬弿杩?/p>

寰湇鍔℃灦鏋勭殑鐞嗚鍩虹 - 搴峰▉瀹氬緥

璋冪敤閾鹃€夊瀷涔媄ipkin锛孭inpoint锛孲kyWalking锛孋AT


閫氳繃杩?2寮犳墜缁樺浘锛屾悶鎳備粈涔堟槸寰湇鍔℃灦鏋?></p> 
 </section> 
 <br> 
</section> 
<section class=

鏈枃閫氳繃OpenWrite鐨凪arkdown杞崲宸ュ叿鍙戝竷

鍏虫敞鎴戯紝鍥炲鈥?/span>鍔犵兢鈥?span class="mq-325">鍔犲叆鍚勭涓婚璁ㄨ缇?/span>


鏈曞凡闃?nbsp;

以上是关于閫氳繃杩?2寮犳墜缁樺浘锛屾悶鎳備粈涔堟槸寰湇鍔℃灦鏋?/h1>

的主要内容,如果未能解决你的问题,请参考以下文章

浜屽垎鏌ユ壘娉曞疄鐜版渶浼樺浘鐗囧帇缂╀綋绉苟涓婁紶

鍓嶅悗绔垎绂昏繃

涓€鏂囧交搴曟悶鎳?zookeeper 鏍稿績鐭ヨ瘑鐐?

(c)2006-2024 SYSTEM All Rights Reserved IT常识