DeepRest: Deep Resource Estimation for Interactive Microservices

Design

DeepRest有以下的设计原则

  • Application-independence
  • Privacy-preserving:只需要common resource metrics和分布式traces,不需要任何log
  • 无监督的

挑战

  • 因为traffic很复杂,需要一个feature extraction process
  • 不同micro-service的资源用量经常co-related

DeepRest有两个使用场景

  • 输入expected traffic,得到估计资源使用量
  • 输入real traffic,估计正常的资源使用量,来检测anomaly

DeepRest Methodology

Distributed Tracing Feature Extractor

步骤一:execution diagrams of spans不能用,因为机器学习需要structured (vectorized) inputs

span需要关联component name和operation name,因此构造 an execution topology graph,每个点是一个(component, operation)

步骤二:构造搜索空间

DeepRest构造了一个feature space,覆盖所有可能的invocation paths。(其实就是全traverse了一遍)

步骤三:DeepRest feature extraction

其实就是每个path的所有prefix,遇到之后就在M里面+1

API-aware Deep Resource Estimator

步骤三:API-aware Neural Design

加了一个掩码,让DNN能够清楚那些APIs和现在估计的资源有关

步骤四:不能使用feedforward neural networks,因为它们不考虑temporal factor,同时也只能接收定长输入。

加入Gated Recurrent Units(GRUs)。就是RNN

步骤五:微服务中的资源是相互关联的

加一个attention向量,来从别的(c,r)传输h

Quantile Regression Optimization

DeepRest不是在每个时间步长给出一个单点估计,而是制定了一个量化回归问题来估计置信区间

Trace Synthesizer

对于提供API traffic来预测资源的任务,因为只有API traffic,没有trace,因此用概率模型来采样逼近