1. 程式人生 > >Service Mesh for Microservices

Service Mesh for Microservices

Let’s try to further understand the service interactions and responsibilities which are shown in figure 3.

Business Logic

The service implementation should contain the realization of the business functionalities of a given service. This includes, logic related to it’s business functions, computations, integration with other services/systems(including legacy, proprietary and SaaS) or service compositions, complex routing logics, mapping logic between different message types etc.

Primitive Network Functions

Although we offload most of the network functions to service mesh, a given service must contain the basic high-level network interactions to connect with the service mesh/side-car proxy. Hence, a given service implementation will have to use a given network library(unlike the ESB world, where you just have to use a very simple abstraction)to initiate network calls (to service mesh only). In most cases, microservices development framework embed the required network libraries to be used for these functions.

Application Network Functions

There are application functionalities which tightly coupled to the network, such as circuit breaking, timeouts, service discovery etc. Those are explicitly separated from the service code/business logic, and service mesh facilitate those functionalities out of the box.

Most of the initial microservices implementations simply ignore the gravity of the network functions offered from a central ESB layer, and they implemented all such functionalities from scratch at each microservice level. Now they have started realizing the importance of having a similar shared functionality as a distributed mesh.

Service Mesh Control Plane

All service mesh proxies are centrally managed by a control pane. This is quite useful when supporting service mesh capabilities such as access control, observability, service discovery etc.

Functionalities of a Service Mesh

As we have seen earlier, the service mesh offers a set of application network functions while some (primitive) network functions are still implemented the microservices level itself. There is no hard and fast rule on what functionalities should be offered from a service mesh. These are the most common features offered from a service mesh.

  • Resiliency for inter-service communications: Circuit-breaking, retries and timeouts, fault injection, fault handling, load balancing and failover.
  • Service Discovery: Discovery of service endpoints through a dedicated service registry.
  • Routing: Primitive routing capabilities, but no routing logics related to the business functionality of the service.
  • Observability: Metrics, monitoring, distributed logging, distributed tracing.
  • Security: Transport level security (TLS) and key management.
  • Access Control: Simple blacklist and whitelist based access control.
  • Deployment: Native support for containers. Docker and Kubernetes.
  • Interservice communication protocols: HTTP1.x, HTTP2, gRPC

Service Mesh Implementations

Linkerd and Istio are two popular open source service mesh implementations. They both follows a similar architecture, but different implementation mechanisms. You can find a very good comparison between these two service mesh implementations at [1].

Service Mesh — Pros and Cons

Let’s have a quick look at the pros and cons of service meshes.

Pros

  • Commodity features are implemented outside microservice code and they are reusable.
  • Solves most of the problems in Microservices architecture which we used to have ad-hoc solutions: Distributed tracing, logging, security, access control etc.
  • More freedom when it comes to selecting a microservices implementation language: You don’t need to worry about whether a given language supports or has libraries to build network application functions.

Cons

  • Complexity: Having a service mesh drastically increase the number of runtime instances that you have in a given microservice implementation.
  • Adding extra hops: Each service call has to go through an extra hop(through service mesh sidecar proxy).
  • Service Meshes address a subset of problems: Service mesh only address a subset of inter-service communication problems, but there are a lot of complex problems such as complex routing, transformation/type mapping, integrating with other services and systems, to be solved at your microservice’s business logic.
  • Immature: Service mesh technologies are relatively new to be declared as full production ready for a large scale deployments.

Conclusion

In summary, service mesh addresses some of the key challenges when it comes to the realization of microservice architecture. It gives you more freedom to select diverse set of microservices implementation technologies as well as to focus more on business logic rather investing more time on network functions between services. However, service mesh won’t solve any of the business logic related or service integration/composition related problems.

Update: “Service Mesh vs API Gateway”?

Please check the articles API Gateways vs Service Mesh for more further information on this.

相關推薦

Introducing Istio Service Mesh for Microservices

Meet Istio “Istio is an implementation of a service mesh. A service mesh is the connective tissue between your services that adds additional capa

Service Mesh for Microservices

Let’s try to further understand the service interactions and responsibilities which are shown in figure 3.Business LogicThe service implementation should c

微服務(Microservices)和服務網格(Service Mesh)架構概念整理

注:文章內容為摘錄性文字,自己閱讀的一些筆記,方便日後檢視。 微服務(Microservices) 在過去的 2016 年和 2017 年,微服務技術迅猛普及,和容器技術一起成為這兩年中最吸引眼球的技術熱點。而以 Spring Cloud 為代表的傳統侵入式開發框架,佔據著微服務市場的主流地位。 微服務(Mi

Service Mesh對企業安全而言意味著什麽?

Service Mesh 企業安全 你聽說過Service Mesh(服務網格)嗎? 我相信你聽說過。Service Mesh正成為容器生態圈愈發重要的一部分。 本文將簡要概述Service Mesh的作用,並深入探討它們對於企業安全性的意義。Service Meshes是什麽?它為何如此重要?連接問

深入解讀Service Mesh背後的技術細節

調用 數據模型 什麽 比較 正常 應用 ffi gcs dsl 本文由 網易雲 發布。 作者:劉超,網易雲首席解決方案架構師 在Kubernetes稱為容器編排的標準之後,Service Mesh開始火了起來,但是很多文章講概念的多,講技術細節的少,所以專門寫一篇

微服務架構下 Service Mesh 會是閃亮的明天嗎?

在一起 7月 部署 服務發現 代理 負載 開源項目 images 我們 7月7日,時速雲企業級容器 PaaS 技術沙龍第 10 期在上海成功舉辦,時速雲容器架構負責人魏巍為大家詳細講解了 Service Mesh 中代表性的實踐方案、並以 Istio 為例詳細講解了 Ser

阿裏雲Kubernetes Service Mesh實踐進行時(1): Istio初體驗

我們 key works code sch 代碼 部署 text 過程 摘要: 本篇文章是系列中的第一篇,主要講述利用阿裏雲Kubernetes容器服務,快速搭建一套用於連接、管理以及安全化微服務的開放平臺Istio,為應用引入和配置多個相關服務。 概述 Istio是一個用

如何在本地數據中心安裝Service Fabric for Windows集群

文檔 和集 安全 htm nec shell dash docs containe 概述 首先本文只是對官方文檔(中文,英文)的一個提煉,詳細的安裝說明還請仔細閱讀官方文檔。 雖然Service Fabric的官方名稱往往被加上Azure,但是實際上(估計很多人不知道)

五分鐘了解 Service Mesh

adf 關聯 com 方式 相互 基礎 增長 然而 加解密 1 背景 1.1 多語言 微服務理念是提倡不同業務使用最適合它的語言開發,現實情況也確實如此,尤其是AI的興起,一般大型互聯網公司存在 C/C++、Java、Golang、PHP、Python、Node

阿裏巴巴中間件團隊在 Service Mesh 的實踐和探索

社區 社會 能說 service ilo 用戶 爭論 出發 obs 摘要: 所有軟件最重要的使命不是滿足功能要求,而是演進,從而持續成長。 精彩觀點導讀:? 我們去探索一項技術,並不會僅僅因為其先進性,而是因為我們目前遇到了一些無法解決的問題,而這項技術正好能解決這個問題。

一文了解“Service Mesh(服務網格)”的歷史與現在

對於大多數人來說,“Service Mesh(服務網格)”仍然是一個新概念,因此,談論它的“歷史”可能看起來有點滑稽。但事實上,早在2010年初,在一些大網路規模的公司中,服務網格的概念就隱約開始逐步形成了。因此,服務網格確實有一段歷史值得去探索、去理解。  

華為多年實踐:ServiceComb在Service Mesh的探索與思考

內容來源:2018 年 6 月 27 日,華為微服務架構師田曉亮在“LC3微服務Workshop | 深入解讀ServiceComb”進行《ServiceComb的ServiceMesh思考及在華為雲的實踐》的演講分享。IT 大咖說作為獨家視訊合作方,經主辦方和講者審閱授權釋出。 閱讀字數:3606 | 10

Service Mesh——下一代微服務架構

定義 根據Linkerd CEO William Morgan定義,Service Mesh是用於處理服務間通訊的基礎設施層,用於在雲原生應用複雜的服務拓撲中實現可靠的請求傳遞。在實踐中,Service Mesh通常是一組與應用一起部署,但對應用透明的輕量級網路代理。

胡忠想|微博微服務架構的Service Mesh實踐之路

前言 說到Service Mesh,在如今的微服務領域可謂是無人不知、無人不曉,被很多人定義為下一代的微服務架構。 Service Mesh在誕生不到兩年的時間裡取得令人矚目的發展,在國內外都湧現出一批具有代表性的新產品,最著名的莫過於Google、IBM領導的Istio,也是Service Mesh技術

唯品會的Service Mesh三年進化史

每種架構風格,都會因各公司面臨的情況不同而有不同的實現路線,Service Mesh也不例外,比如江南白衣描述的唯品會的服務化體系開放服務平臺OSP(Open Service Platform)走的ServiceMesh之路就與流行的Istio不同。但它們要解決的核心問題是相似的,比如服務的註冊發現、路由、熔

螞蟻金服 Service Mesh 實踐探索

SOFAMesh是螞蟻金服在ServiceMesh方向上的探索,下面是它高階技術專家敖小劍在QCon上海2018上的演講。   Service Mesh 是一個 基礎設施層,用於處理服務間通訊。現代雲原生應用有著複雜的服務拓撲,服務網格負責在這些拓撲中 實現請求的可靠傳遞。 在實踐

螞蟻金服 Service Mesh 漸進式遷移方案|Service Mesh Meetup 實錄

敖小劍,螞蟻金服高階技術專家,十六年軟體開發經驗,微服務專家,Service Mesh 佈道師,Servicemesher 社群聯合創始人 龍軾,阿里巴巴技術專家、前京東 Hadoop 負責人、Hadoop 程式碼貢獻者、現負責UC 基於 Kubernetes 自研的 PaaS 平臺整體的

Service Mesh 及其主流開源實現解析(轉)

什麼是 Service mesh Service Mesh 直譯過來是 服務網格,目的是解決系統架構微服務化後的服務間通訊和治理問題。服務網格由 sidecar 節點組成。在介紹 service mesh 之前,我們先來看一下什麼是 sidecar. Sidecar 在軟體系統架構中特指邊車

no service found for - "org.qt-project.qt.mediaplayer"

跑GitHub上的一個專案: Kugou Music 發現音樂播放沒有聲音 控制檯報錯: defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"

Kong 1.0.0 RC4 釋出,修復 Service Mesh 問題

   Kong 1.0.0 RC4 釋出了,Kong 是一個雲原生、快速、可擴充套件和分散式的微服務抽象層(也稱為 API 閘道器),通過外掛擴充套件功能。 此版本主要修復了 RC3 中的 Service Mesh 問題。 Service Mesh and Stream Rou