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
上传
 
 
 
读取
相关文章
相关标签/搜索