A user-facing bug causes search results to be unavailable for your service. Someone suggests adding a prober to monitor the service and, if search results are unavailable, notify the team via bug report. Google has plenty of prober options available; if we pick one and use it we’re done, right?

Not necessarily. Just because monitoring could detect a bug does not mean it is the best, or only, solution. For any given bug, you should consider which mixture of monitoring and testing is appropriate. Monitoring and testing each have pros and cons, and solve slightly different problems.
Monitoring observes—and sometimes interacts with—user-facing production systems. Monitoring is useful for detecting:
  • Load issues: Real users accessing real services induces load on real servers. The only way to measure the effect of production traffic is to directly measure the servers themselves. Common measurements include QPS, RPC response times, memory usage, and disk usage.
  • Service unavailability: A service might become unavailable because (1) the service itself is down, or (2) the services on which it depends are unavailable. Monitoring end-user experiences (e.g., “Does web search return results?”) is a great way to detect and alert about this situation.
  • Unanticipated user behavior: Even the most well-designed test scenarios can fail to anticipate real user behavior. Monitoring can inform your quality strategy by observing and measuring real-world behavior.
  • Version incompatibility: Different binary versions may interact incompatibly in ways that are hard to detect without production data. Monitoring can detect unanticipated data inconsistencies.
  • Data changes: User-facing data can change over time, sometimes in bad ways. Monitoring can statistically characterize data, diff them against previous data state, and alert on outside-of-threshold changes.
Testing isolates components in a non-production environment and verifies components’ behavior. Since it occurs prior to release, it reduces the cost of fixing a bug. Testing is useful for ensuring:
  • Functional correctness: A hermetic unit test remains the best way to prove that a small piece of code logic fulfills its interface contract.
  • Inter-component compatibility: An integration test is an excellent way to ensure that two components (e.g., a client and a Stubby service) work together properly.
When considering which techniques to employ, review the list above to determine which ones are appropriate. Worried about an individual vendor’s ad inventory suddenly dropping? Monitor ad volume for each vendor! Unsure if the price2value() function handles currency conversions? Write a unit test! Not sure how often users actually log into your system? Monitor login events! A judicious mix of monitoring and testing will speed up development and ensure that fewer bugs reach end users.

Episode 388: Testing vs Monitoring的更多相关文章

  1. docker 镜像管理

    docker:/root# docker search centos NAME DESCRIPTION STARS OFFICIAL AUTOMATED centos The official bui ...

  2. docker 创建镜像

    docker:/root# docker search centos NAME DESCRIPTION STARS OFFICIAL AUTOMATED centos The official bui ...

  3. Docker镜像与仓库(一)

    Docker镜像与仓库(一) Docker镜像与仓库(一) 如何查找镜像? Docker Hub https://registry.hub.docker.com docker search [OPTI ...

  4. 前端性能核对表Checklist-2018

    前端性能核对表Checklist-2018 1. 计划与度量 Get Ready: Planning and Metrics ☐ Establish a performance culture. ☐ ...

  5. 热修复 DexPosed AOP Xposed MD

    Markdown版本笔记 我的GitHub首页 我的博客 我的微信 我的邮箱 MyAndroidBlogs baiqiantao baiqiantao bqt20094 baiqiantao@sina ...

  6. linux tcp调优

    Linux TCP Performance Tuning News Linux Performance Tuning Recommended Books Recommended Links Linux ...

  7. 20 个 OpenSSH 最佳安全实践

    来源:https://linux.cn/article-9394-1.html OpenSSH 是 SSH 协议的一个实现.一般通过 scp 或 sftp 用于远程登录.备份.远程文件传输等功能.SS ...

  8. dexposed框架Android在线热修复

    移动client应用相对于Webapp的最大一个问题每次出现bug,不能像web一样在server就完毕修复,不须要发版本号.紧急或者有安全漏洞的问题, 假设是Webapp你可能最多花个1,2个小时紧 ...

  9. Codeforces Testing Round #10 A. Forgotten Episode

    水题,注意数据范围 #include <iostream> using namespace std; int main(){ long long n,a; cin >> n; ...

随机推荐

  1. MagicSuggest – Bootstrap 主题的多选组合框

    MagicSuggest 是专为 Bootstrap 主题开发的多选组合框.它支持自定义呈现,数据通过 Ajax 异步获取,使用组件自动过滤.它允许空间免费项目,也有动态加载固定的建议. 您可能感兴趣 ...

  2. 让你忘记 Flash 的15款精彩 HTML5 游戏

    HTML5 游戏开发是一个热门的话题,开发人员和设计人员最近经常谈论到.虽然不能迅速取代 Flash 的地位,但是 HTML5 凭借它的开放性和强大的编程能力,取代 Flash 是必然的趋势.你会看到 ...

  3. CSS3文本温故

    1.CSS早期属性,分为三大类:字体.颜色和文本: 2.CSS文本类型有11个属性: 注:还有一个颜色属性:color,主要用来设置文本颜色 3.CSS3文本阴影属性:text-shadow语法:te ...

  4. 总结的一些微信API接口

    本文给大家介绍的是个人总结的一些微信API接口,包括微信支付.微信红包.微信卡券.微信小店等,十分的全面,有需要的小伙伴可以参考下. 1. [代码]index.php <?php include ...

  5. 深入理解javascript---命名函数表达式

    简单的说,命名函数表达式只有一个用户,那就是在Debug或者Profiler分析的时候来描述函数的名称,也可以使用函数名实现递归,但很快你就会发现其实是不切实际的.当然,如果你不关注调试,那就没什么可 ...

  6. javascript --- 实时监听输入框值的变化

    实时监听文本框值变化是非常常见的功能,通常最简单的办法就是用keyup,keydown来实现,但是这种方法有两个问题,一个是当直接复制粘贴的时候没法监听到事件,另外一个问题是在移动端,使用删除键删除输 ...

  7. 【C语言】C语言运算符

    目录: [算术运算符] [自增运算符] [自减运算符] [关系运算符] [逻辑运算符] [三目运算符] [sizeof运算符] · 作用 1.算术运算符 +(加).-(减).*(乘)./(除).%(取 ...

  8. Android实用代码七段(五)

      前言  每次分享意味着每次都有进步,本系列以实用为主,欢迎和我分享和推荐好用的代码段~~ 声明 欢迎转载,但请保留文章原始出处:)  博客园:http://www.cnblogs.com 农民伯伯 ...

  9. IOS开发之功能模块--给任意的UIView添加点击事件

    前言:好久没写博客,今天来一波.我在实际项目开发中,会遇到这样功能需求:我已经搭好了iOS的UI界面,但是很多界面的子View用了UIView,然后这些UIView中用了UILabel和UIImage ...

  10. 全面理解JavaScript中的闭包的含义及用法

    1.什么是闭包 闭包:闭包就是能够读取其他函数内部变量的函数;闭包简单理解成“定义在一个函数内部的函数”. 闭包的形式:即内部函数能够使用它所在级别的外部函数的参数,属性或者内部函数等,并且能在包含它 ...