alluxio源碼解析-rpc調用概述(1)

alluxio中幾種角色以及角色之間的rpc調用:

做爲分佈式架構的文件緩存系統,rpc調用必不可少緩存

client做爲客戶端網絡

master提供thrift rpc的服務,管理如下信息:架構

  • block信息
  • fileSystem信息
  • meta信息
  • metrics信息
  • lineage信息

worker提供thrift rpc和netty rpc,管理一下信息:tcp

  • block的實際訪問與存儲

 

不一樣版本alluxio,rpc方式的變化

在不斷的迭代更新中,rpc調用方式也發生了變化:分佈式

1.4版本:只採用thrift做爲rpc的手段ui

1.8版本:採用thrift和netty做爲rpc的手段spa

 

2.0版本:採用grpc和netty做爲rpc的手段netty

 

 

 

(1.8版本)client和worker之間rpc調用的交互流程

下圖中,包括了基本的讀取,刪除,寫入,建立目錄等操做.code

 

 

經過抓包分析,也能夠粗略的看到各類rpc調用

 thrift調用:

抓取方法:(比較笨的方法,過濾掉用無用的心跳包)xml

thrift  and tcp.len ne 90 and tcp.len ne 2423 and tcp.len ne 60  and tcp.len ne 116 and tcp.len ne 45 and tcp.len ne 67 and tcp.len ne 54 and tcp.len ne 37 and tcp.len ne 2566

 

上傳
 
 
 
讀取
 
 
 
刪除
 
 
建立文件夾
 
刪除文件夾
 

netty調用(Short circuit):

抓取方法:

 tcp.port eq 29999

 

netty調用(純網絡傳輸):

alluxio.user.short.circuit.enabled=false

抓取方法:

 tcp.port eq 29999
上傳
 
 
 
讀取
相關文章
相關標籤/搜索