Episode 388: Testing vs Monitoring

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.

时间: 2024-08-29 15:46:50

Episode 388: Testing vs Monitoring的相关文章

Permanent Link: 101 ways to speed up your Magento e-commerce website

101 ways to speed up your Magento e-commerce website May 18, 2010/in E-commerce, Magento /by Guido Jansen As you probably know by now, Google is Using site speed in web search ranking. And I couldn’t agree more: speed is important for your site, and

Docker安装与镜像管理(一)

一.安装docker yum install epel-resase yum install docker-io  (RHEL6) yum install docker (RHEL7) 系统: [[email protected] ~]# uname -a Linux kvm.huangming.org 2.6.32-573.el6.x86_64 #1 SMP Thu Jul 23 15:44:03 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux [[email 

dexposed框架Android在线热修复

移动客户端应用相对于Webapp的最大一个问题每次出现bug,不能像web一样在服务器就完成修复,不需要发版本.紧急或者有安全漏洞的问题, 如果是Webapp你可能最多花个1,2个小时紧急发布上线,但是app呢,打包,跪求市场发布几百个渠道,周末还发不了,app配置升级,你还不能配置 强制升级, 就算配置提示升级,用户心里肯定想前两天刚升级最新版,怎么又要升,而且升级要流量,这时候会很反感甚至卸载应用.所以安卓是否 有能力做到在线打补丁?dexposed给我们解决了这个问题. 1.淘宝Dexpo

热更新 阿里的Dexposed

介绍 GitHub 重要提醒: 1.此方案不支持ART(Android 5.0 及之后的Android版本),这一点是致命的! 2.此方案不支持Dalvik 3.0(专为平板设计的Android版本) 3.只支持 ARM 架构 基于此,注定它会逐步失声,再多的优点也是徒劳. dexposed enable 'god' mode上帝视角 for single android application. 基本实现原理简介 下面是一段比较官方的介绍: Dexposed中的AOP原理来自于Xposed.在

Codeforces Testing Round #10 A. Forgotten Episode

水题,注意数据范围 #include <iostream> using namespace std; int main(){ long long n,a; cin >> n; long long sum =(n*(n+1))>>1; for(int i = 0 ; i < n-1 ; ++i){ cin >>a; sum -=a; } cout<<sum<<endl; } Codeforces Testing Round #10

Thermal zone monitoring in an electronic device

FIELD One embodiment of the invention relates to a closed loop thermal control process in a portable electronic device having several embedded temperature sensors. Other embodiments are also described. BACKGROUND Most electronic products in use today

14 Live CDs for Penetration Testing (Pen Test) and Forensic

http://www.ivizsecurity.com/blog/penetration-testing/live-cd-penetration-testing-pen/ Yesterday I was researching for some of the other lesser known live CDs for penetration testing.  While I’m an avid user and a fan of backtrack, someone mentioned t

Oracle监控代理安装ITM(IBM Tivoli Monitoring)

1 监控代理安装 2 1.1 安装 2 1.1.1 解压安装包 2 1.1.2 安装 2 1.2 配置 5 1.2.1 给Agent授权 5 1.2.2 配置Oracle Agent 10 目录 1   监控代理安装 1.1  安装 1.1.1  解压安装包 #将安装压缩包解压到 /data/ora_agent  目录下: [[email protected]   data]# tar -xvf oracleagent_10g11g_for_linux.tar   -C /data/ora_ag

How to Add Linux Host to Nagios Monitoring Server Using NRPE Plugin

In our first part of this article, we’ve explained in detail on how to install and configure latest Nagios Core 4.2.0on CentOS 7.2 server. In this article we will show you how to add Remote Linux machine and it’s services to Nagios Monitoring host us