Skip to Content
数据库可靠性工程:数据库系统设计与运维指南
book

数据库可靠性工程:数据库系统设计与运维指南

by Laine Campbell, Charity Majors
November 2020
Beginner to intermediate
214 pages
5h 10m
Chinese
Posts & Telecom Press
Content preview from 数据库可靠性工程:数据库系统设计与运维指南
52
|
第
4
章
•
对于任何任务或者独立的工作流,都应该以相似的方式实施监控。
•
与数据库、缓存和其他数据存储进行交互的可复用代码(例如方法或函数),也应进行
类似的度量。
•
监控每个终端、页面或者函数
/
方法调用数据库的次数。
追踪每个操作的数据访问代码(比如
SQL
调用),以便快速地和数据库中详细的查询日志
相互参考;但对于
ORM
(
object-relational mapping
,对象关系映射)而言这是一个挑战,
因为该系统中
SQL
是动态生成的。
SQL
注释
当对
SQL
调优时,将数据库中运行的
SQL
语句和调用该语句的代码位置对
应起来很困难。许多数据库引擎可以添加注释,这些注释会在数据库查询日
志中打印出来,这是记录代码位置的好地方。
4.6.1
 分布式追踪
追踪从应用程序到数据存储层每个阶段的性能,对于解决很难捕捉到的长尾延时问题非常
重要。像
New Relic
或
Zipkin
等开源解决方案,可以实现从应用程序调用到外部服务(比
如数据库)的分布式追踪。理想情况下,从应用程序到数据存储的完整事务追踪,应该掌
握每个外部服务调用的耗时,而不仅仅是数据库查询的耗时。
数据库的追踪完全可视化之后,将成为培训软件工程师以及培养独立精神的有力工具。
你不需要告诉他们关键点在哪儿,他们可以自己获取该信息。就如同
Last Pickle
公司的
Aaron Morton
在演讲中谈到的:“用
Zipkin
替代
Cassandra
的追踪功能。”
事先预测哪些工具会带来这种积极的文化转变基本上是不可能的,但是我从
Git
及其
pull ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Java持续交付

Java持续交付

Daniel Bryant, Abraham Marín-Pérez
机器学习流水线实战

机器学习流水线实战

Hannes Hapke, Catherine Nelson
解密金融数据

解密金融数据

Justin Pauley

Publisher Resources

ISBN: 9787115548863