國內酒店:通過架構改進,我們計劃優化掉300+臺服務器

{"type":"doc","content":[{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"一、背景"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"1、線上問題回顧"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2019年8月某天,那時我剛入職還不到一個月,遇到一個特殊的線上問題:某報價應用個別機器連續FGC不停(準確的說是FGC幾乎沒任何效果),這些機器重啓後不久繼續開始不停的FGC。當時特意留了當時現場的jstat數據截圖,這也是我頭一次遇到連重啓應用都解決不了FGC的場景。最終,通過刪除一些無用字段等手段讓FGC問題得到緩解。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"之後,我認真的梳理了這個應用的核心接口邏輯及總體架構設計,最後對這個“有狀態\"架構設計(準確的說,是分佈式的數據懶加載架構帶來的壓力及內存不均衡)有了清晰的認識,也萌發了對這個設計進行“大手術”的念頭,本文的重點也是對這種架構進行的優化。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/9d\/9d01e0c29743d87af778c8e7d59b8ea3.webp","alt":"Image","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"2、涉及的核心接口說明"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"首先做一下相關名詞解釋:酒店排序算法通常分爲全局排序(粗排)和部分酒店二次處理(精算),全局排序階段涉及酒店量大,而且特徵影響因素很多,報價的具體精確值對排序結果影響不大,之後部分二次處理是因爲需要選擇部分做頁面展示,需要對展現的那些少量酒店按身份、參與的活動等精確計算。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"接下來具體介紹一下這個應用提供的核心接口:Sort接口。這個接口主要完成的就是對用戶搜索酒店列表時的“粗排”,具體來說,是根據城市等參數返回滿足條件的酒店排序,同時返回最低價等一些報價信息。這個“粗排”完成之後,上游的搜索排序系統結合一些特徵因素選擇出需要展示的部分酒店,繼續調用其他應用的Render接口完成對指定酒店的“精算”,這時會得到實際的酒店最低價及參加的活動、優惠等詳細報價信息。總結一下,Sort接口完成的是酒店的篩選及基礎的排序,最終每個酒店的報價詳細信息是來自於其他應用的Render接口完成。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們這裏實際要做的就是對Sort接口的優化。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/fb\/fbbc179245602c5cde0f7c8742a06720.png","alt":"Image","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"3、“有狀態”架構說明"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"通過下圖可以看出,Sort接口在Nginx(之後切換到OpenResty)層有負責的路由邏輯,在路由層根據多個請求參數藉助一致性hash等路由策略將整個應用拆分了將近90個集羣!不同的集羣的內存裏緩存了不同的數據。這一切,標誌着Sort接口的設計是個複雜的“有狀態”架構設計。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"暫時先不說“有狀態”架構設計的優劣,單獨爲每個集羣準備1臺服務器,線上就需要將近90臺服務器,而實際中我們需要保證每個小集羣都自成一個獨立完整的集羣,那麼每個集羣至少需要2臺服務器(否則發佈時某個集羣就可能沒機器在線了),這樣線上就至少需要將近180臺服務器了。再加上一些對北上廣深等熱門城市需要重點保證高可用,每個熱門集羣會冗餘部署10幾臺甚至20幾臺服務器,還要考慮跨機房部署等各種情況,最終這個應用實際在線服務器將近340臺。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Sort接口架構設計額外需要補充的是,當請求進到指定服務器上進行處理時,如果內存裏沒有數據命中,同步流程會直接返回無報價,同時會異步抓取相關報價,藉助一條鏈路的“有狀態”設計(比如發送和消費的消息帶ip地址),最終相關的報價會寫到指定的服務器內存裏。這樣下次有相同的請求進來時就可以命中內存了,這種設計帶來的是每個請求都會犧牲第一個用戶的體驗。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"( 說明:熱門日期指的是出發日期、到達日期相對今天都在3天以內,即T+0、T+1、T+2、T+3 ,比如 beijing03 走的是專門的熱點集羣,而beijing04 由於日期不熱門,走的是普通集羣 )。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/72\/72007226db5284960e44adc60b48fd0d.png","alt":"Image","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"二、調整前架構利弊分析"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"接下來,具體看一下當前“有狀態”架構結合現有業務場景表現出來的優缺點。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"1、優點"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"1)絕大部分請求可以精確命中內存,數據處理極快;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2)熱門城市+熱門日期對應的集羣是穩定的,也承擔了絕大部分核心的請求壓力;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"3)非熱點集羣如果出問題,影響較小,請求量也小。前面的問題回顧裏,實際影響是很多非熱門的城市的請求,雖然個別集羣在一直FGC,但一個非熱門集羣佔比很低,對總體影響並不大。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"2、缺點"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"1)採用有狀態設計,增大了分佈式系統的複雜性,運維成本較高,擴展性差一些,不能輕易做橫向擴展;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2)路由層很難調整,且調整的風險較高。如果調整,還需要考慮內存及redis裏已有數據的處理,並且出現短時間的數據命中率變低;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"3)非熱門集羣請求不均衡(單個集羣內是均衡的),這是一致性hash策略帶來的,最終導致不同集羣處理的請求量差別很大;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"4)非熱點集羣間使用內存差別較大。通常一級節點爲\"城市FromTo\",主要看城市下酒店的數量及酒店報價情況,不同城市差別巨大,因此會出現有些服務器內存緊張、有的服務器內存使用很少的情況;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"5)爲了控制緩存的數據量,非熱點集羣一級節點有上限,這就容易出現一些重要的請求沒有被緩存。比如上限的100個節點滿了,之後beijing04這種請求就無法放入內存,而之前有xxx04可能一直佔着內存節點卻用不上;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"6)熱門日期不可變,而實際中熱門日期可能會有短時間的調整,比如國慶前 beijing04、beijing05可能變爲熱門日期;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"7)無法確定一個非熱門請求具體落在哪個集羣哪個節點上,因爲實際日期一變算出的絕對From和絕對To的值就發生變化了;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"8)同一個集羣下不同節點緩存的內存數據也是不同的,導致很難精確的知道一個請求具體會落在哪臺機器上;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"9)不利於壓測。調權不方便,也很難控制流量單獨打到指定集羣,相同請求不同時間可能會打到不同的機器上。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"三、去“有狀態”架構規劃及過程"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"1、核心矛盾確定與分析"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"核心矛盾:接口響應時間與數據存儲之間的矛盾。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"具體說一下,從用戶體驗出發,接口響應時間要越短越好。接口響應時間要短,數據的存儲就非常關鍵(獲取數據時間:內存 > 分佈式緩存 > DB),這裏要保證接口儘可能快,就會考慮使用內存。但是放在內存的話,就會出現數據量級太大,普通虛機可能存儲不下的情況,就會引出目前”有狀態“架構的方式進行存儲。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"如果能通過優化讓單臺機器完全緩存下來相關報價數據,那麼“有狀態”架構就可以理論上廢棄掉了,這時需要考慮機器啓動時數據拉取及啓動後的數據變更處理,也會涉及到數據壓縮存儲、實際報價落地(本質上說是單日價落地)、實際報價變更的處理,這時就既能滿足接口響應時間短的需求,又能保證數據存儲沒問題。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"2、去“有狀態”架構方案調研"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"本質上我們是期望既要保證接口響應時間儘量短,又要保證數據存儲合理。我們專門做了相關方案的調研,以及去其他同行業公司去做經驗交流,最終我們明確了一些結論和注意事項:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"1)做酒店搜索排序時,主要依靠專門的搜索排序服務完成,而不是業務團隊來完成,會藉助搜索引擎來完成搜索和排序;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2)數據做好壓縮存儲,實體機是可以存放全量酒店維度的報價數據的;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"3)如果使用實體機做全量數據緩存,需要處理好啓動時全量數據的拉取,以及啓動之後增量變更數據的同步;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"4)需要考慮大內存機器FGC時間長的問題;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"5)國內酒店報價都是按天給出的,多日價很少,可以忽略(這一點對數據存儲特別關鍵)。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"下圖是一個典型的同行業公司的報價業務整體架構設計:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"1)存儲服務:接受來自portal管理臺人工錄入和同步ota系統相關數據,將其保存到DB中,並廣播變更信息;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2)搜索服務:消費相關消息,寫入nosql中,提供列表頁粗排;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"3)查詢服務:消費相關消息,寫入redis和內存中,提供列表頁精算及詳情頁報價。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/71\/718dc48535a701351c9e9629c49eaf7c.png","alt":"Image","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"3、去“有狀態”架構方案確定"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在做了大量的調研和探討後,我們制定了最終的架構調整方案。方案的核心是去掉Sort接口,【粗排】相關字段通過拉取及消息變更放到上游的搜索排序系統裏,需要準確的字段藉助Render接口【精算】來保證。這樣,Sort接口的“有狀態”架構設計及複雜的路由層邏輯就都可以去掉了。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"最終的架構形態如下圖所示:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/a7\/a741d79f583da4dbd956af1f74124430.png","alt":"Image","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"爲了完成上圖中橙色部分的數據處理和邏輯調整,我們複用了之前酒店分銷業務已經落地的報價數據,通過增加處理變價消息等手段,將相關數據存儲到相關的Redis裏去適配本次架構調整,並且將報價數據以消息的方式同步到上游搜索排序系統。搜索排序相關的服務器在啓動時主動拉取相關數據到內存中,並且處理相關的變化消息來保證內存中數據是最新的。這裏實際調整很大,涉及的邏輯也比較複雜,具體可參考下圖:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/82\/828c28d261efde47727fd83aff665e84.webp","alt":"Image","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"4、實際落地規劃與風險控制"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"1)報價側調整底層存儲,接收分銷業務已有的單日價變更消息(本次新增),存儲相關數據到Redis中;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2)報價側獲取單日價的變化,去重後通知給搜索排序系統;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"3)搜索排序系統處理通知,把數據放入內存(這是在確認了實際報價數據能在內存中全放下才確定放到大內存裏的);"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"4)搜索排序系統將原Sort請求調整爲查本地內存,不再調用Sort接口,逐漸放量驗證,關注數據的覆蓋程度、準確性、整個流程涉及應用的性能;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"5)不斷的優化請求處理,直至【粗排】完全查搜索排序系統本地內存;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"6)原有Sort接口在最終全部切換前保持不動,作爲實際切換出問題時的整體兜底策略;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"7)搜索排序系統完成【粗排】全量查本地內存數據後,原Sort接口走下線流程。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"四、預期收益"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"本次調整完成之後,Sort接口移除,路由層的配置移除,原有Sort接口所在應用部署的將近340臺機器幾乎全部下線回收(可能會留2-4臺處理剩餘的非核心請求,QPS很低),而上游的搜索排序系統由於本身內存放得下,不需要額外增加機器,同時也能更合理的使用大內存服務器的內存優勢。當然,這些調整會增加對分佈式緩存Redis、消息隊列的使用,這部分資源成本的消耗可在Sort接口下線後,通過回收之前鏈路佔用的資源來抵消。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"總結一下:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"1、酒店搜索排序服務可用性增強:去掉了對Sort接口的依賴;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2、酒店搜索排序流程總體時間縮短,用戶體驗得到提升:使用內存已有數據代替併發請求Sort接口獲取數據;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"3、節省Java應用300+臺線上虛擬機:本質上是Sort接口占用的機器幾乎可以全部節省下來了;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"4、酒店整體架構趨於完善、統一,系統邊界清晰:搜索排序團隊負責篩選出酒店,報價業務團隊則負責完成對實際酒店報價的精算;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"5、開發人員日常運維成本降低:減少一個重型P1系統的日常運維,查問題效率可以得到提升;"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"6、OPS運維壓力減輕:Sort接口路由層複雜的配置可以直接幹掉。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"五、未來規劃"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"去“有狀態”架構的事情我們還會持續去做,Sort接口的“有狀態”架構設計被優化掉以後,配合完成“有狀態”架構的還有一個完整的迴路,之後可以繼續沿着數據寫入方向,倒序將整個迴路裏的“有狀態”設計優化掉。這些整體上也符合“降成本”的方向。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"除了去“有狀態”的優化方向外,我們還會繼續考慮對整體架構進行合理化和簡單化。報價業務相對複雜,只有架構做簡單和合理了,才能在實際中完成我們期望的“工作提效”和“降成本”。"}]},{"type":"horizontalrule"},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"頭圖:Unsplash"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"作者:鄭吉敏"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"原文:https:\/\/mp.weixin.qq.com\/s\/qS0nrR7D4a1R2Z_XQnGJRQ"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"原文:國內酒店:通過架構改進,我們計劃優化掉300+臺服務器"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"來源:Qunar技術沙龍 - 微信公衆號 [ID:QunarTL]"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"轉載:著作權歸作者所有。商業轉載請聯繫作者獲得授權,非商業轉載請註明出處。"}]}]}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章