✍️
ZiXiang-Blog
  • Jerry Wang Blog
  • 使用 TorchServe 部署 Model
  • How do AppRTC work in WebRTC mechanism ?
  • [系統設計]- 容易產生設計盲點
  • Golang
    • [Golang] Goroutine Concurrency多執行緒淺談
    • [Golang]: 進階用法
    • Golang go mod 入門
    • [Golang] 讓 Goroutine Debug 變得更簡單
  • Security
    • HTTP Token 使用方式: Basic Token v.s Bearer Token
    • 從 RFC 規格書觀點解析 OAuth 2.0
    • 區塊鏈物聯網架構 解決哪些安全性議題?
  • Broker
    • [深入淺出MQTT]: v3.1.1與v5 的差異
    • Broker 到底是什麼?
  • patterns
    • Patterns for Organizing Domain Logic
    • Domain Model: 從無到有規劃新的服務
    • 淺談CQRS
    • Backend System in Microservice Architecture: Where Does data store?
    • Ambassador pattern with Shared Database Pattern
    • Microservice Pattern 犧牲了什麼?
  • K8s
    • 分散式系統: 現代軟體架構與設計考量
    • Kubernetes 超入門
    • Kubernetes 架構
    • K8s 在 DevOps 中的作用
  • Database
    • Relation Database Index Overview
    • Draft: RDBMS(MySQL) v.s NoSQL (Monogo)
    • [淺談]- How Do RDBMS Thread work ?
    • [淺談]-NoSQL資料庫怎麼選?
    • How do pick the database more correctly?
    • Draft: 關聯式資料庫需要知道的幾件事
  • HTTP
    • Overview The WebSocket Mechanism
Powered by GitBook
On this page
  • What's Distribution System?
  • Distribution System Design Goals
  • Type of Distributed systems
  • 參考文件

Was this helpful?

  1. K8s

分散式系統: 現代軟體架構與設計考量

分散式系統的定義: A distributed system is a collection of autonomous computing elements that appears to its users as a single coherent system。

PreviousMicroservice Pattern 犧牲了什麼?NextKubernetes 超入門

Last updated 3 years ago

Was this helpful?

What's Distribution System?

[1] The Definition of Distribution: A distributed system is a collection of autonomous computing elements that appears to its users as a single coherent system.

  • Collection of autonomous computing elements 達到搜集算力是分散式系統的必要條件,一般來說是透過P2P (Peer to Peer) 連線方式做到。而在這種網路連線下,主要有3個 Issues 。1. How do verify member node? 2. Node connection state check Issue. 3. Can nonmember elements access member elements ?

  • Single coherent system 使用者在存取系統的時候,並不會感受到是存取不同的裝置,會認為他是同一個系統。而要達到這樣子統合各裝置的能力,則需要 Middleware 的幫忙。

  • Middleware and distribution systems Middleware 用於統合各個 Node 的資源,讓使用者無法感知到存取的服務,可能是處於不同的機器。根據上述定義,分散式系統應如下圖的架構,各個算力資源(element) 透過網路來介接,並串聯成一個整體的生態系,即使是外部資源存取,也不會察覺該服務的節點差異。

Distribution System Design Goals

  • Resource Sharing

    Resource 不僅是指硬體資源也包含周邊資源,ex: 印表機等等

  • Making distribution transparent

Transparent
Description

Access

不同的機器之前互相可以存取,即使是不同的作業系統或硬體規格。

Location

使用者在不同位置存取時,不會感受到區別。ex: 透過 URL 進行存取。

Relocation

當使用者轉移位置時,不會感知到也不影響使用。

Migration

使用者隨著移動,不影響資料的一致性。

Replication

當系統進行備份的時候,不影響使用者。

Concurrency

系統可以讓多個使用者同時存取。

Failure Tolerance

當系統失敗重啟的時後,不影響使用者。

為了做到 Transparent 應考量 Separating policy from mechanism 因為採用 Monolithic 難以有足夠的彈性做到Transparent的目地。拆分成多個Service 更能夠做到 migration、replication、Failure Tolerance等目地。

  • Being scalable 在分散式系統中,Masking Failures Issue 是非常困難且重要的。因此,系統的 Scalability 就是相當重要的,使得 Service 故障排除的過程,不影響使用者。 然而在 Scalability 本身就會牽涉到另一個議題,要如何不讓使用者察覺,因此 Degree of distribution transparency 就是值得被考慮的議題。

Degree of distribution transparency

在分散式系統中會因為地區的不同,存取時間會受到影響。若要完全 distribution transparency ,使用者體驗則會影響到,因此需要對使用者分級,通常是以地區作為區分。

If such reliability cannot be guaranteed, it's then best to always perform only local execution, leading to the copy-before-use principle.

  • Being Open

    提供一個公開的介面,給其他裝置存取。如URL、DNS、IDL (Interface Definition Language)

  • Caching

    在 Replica 的架構下衍伸出來的問題是,Cache 的狀態的一致性。

Type of Distributed systems

在分散式系統中,主要有三種大的服務型態的High Performance Distributed Computing, Distribution Information, Pervasive Computing,等三種服務的型態。

High Performance Distributed Computing 屬於高性能的計算能力,主要有兩種。一種是屬於叢集式的實體服務,組合一個大型的聯合系統。

  • Cluster Computing 透過建置實體機器,串連起算力以提供服務。

  • Cloud Computing 由服務商建制叢集式的服務,由服務商將算力切分出來,主要分為三種型態IaaS (Infrastructure-as-a-Service)、PaaS(Platform-as-a-Service)、SaaS (Software-as-a-Service)等三種型態。

Distributed Information Systems 這種服務型態主要就是現在主流服務的型態 (Query/Response) 的服務型態,有 Transaction Process (TP) 進行搜集全部的 Requests,進行 serving。

Pervasive Systems Sensors 本身自形成一個網路,與雲端上的的服務進行溝通。

參考文件

[1] van Steen, Maarten, and Andrew S. Tanenbaum. "A brief introduction to distributed systems." Computing 98.10 (2016): 967-1009.