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.

最新文章

  1. UIWindows 使用注意
  2. C++11 并发指南系列
  3. Android一个大众化的设置界面
  4. mac下配置eclipse的hadoop环境
  5. 【Framework】HTTP运行期与页面执行模型
  6. 【转】Java中字符串中子串的查找共有四种方法(indexof())
  7. Unix/Linux环境C编程入门教程(22) C/C++如何获取程序的运行时间
  8. 企业架构研究总结(28)——TOGAF架构开发方法(ADM)之需求管理阶段
  9. php in_array语法
  10. 如何在Win7安装U盘中加入USB3.0驱动的支持
  11. js复制链接
  12. 【Jenkins】通过ANT构建JMeter任务时提示找不到jtl文件时的解决方法
  13. io多路复用(二)
  14. 并发系列(6)之 ThreadPoolExecutor 详解
  15. linux命令-diff对比文件工具
  16. 02、创建RDD(集合、本地文件、HDFS文件)
  17. MyBio小隐本记注册破解
  18. Codeforces Round #503 (by SIS, Div. 2)-C. Elections
  19. 逆袭之旅DAY16.东软实训.Oracle.匿名块
  20. 设计模式学习——工厂模式(Factory Pattern)

热门文章

  1. 优秀案例:12个精美的设计工作室 & 设计公司网站
  2. css对齐
  3. SQL SERVER代码生成器必备
  4. chrome developer tool—— 断点调试篇
  5. Sharepoint 2010 工作流启动时处理出错
  6. Servlet基础(二) Servlet的生命周期
  7. Android实现登录
  8. Unable to execute dex: Multiple dex files define(错误分析)
  9. 造成OOM(内存溢出)的几种情况
  10. 【C语言】外部函数和内部函数