Skip to Content
监控运维实践:原则与策略
book

监控运维实践:原则与策略

by Mike Julian
November 2020
Intermediate to advanced
142 pages
3h 12m
Chinese
Posts & Telecom Press
Content preview from 监控运维实践:原则与策略
74
|
第
7
章
到底该怎样监控这样的一个函数呢?传统的轮询模型没有用,因为轮询间隔不够短。
很多
serverless
平台已经记录了一些指标,例如执行时间、调用次数以及错误率等。但是,
你可能还想要了解函数内部的运行情况。
答案很简单:运用
StatsD
来监控。回顾一下本章的开头,你可以获取更多关于
StatsD
的
信息。
此外,不要忘记函数可能正在利用其他已建立好的服务,这些服务已经自带了指标和日志
(例如
AWS S3
和
AWS SNS
等),所以一定也要检查那些已建立好的服务。
当然,监控一两个函数并不等同于监控整个架构都基于它们而构建的环境。如果你的情况
是那样的,那你可能会对分布式跟踪很感兴趣。
7.6
 监控微服务架构
在一个微服务主宰一切的世界里,优秀的监控变成了必需品。不管你有
3
个或
4
个,还是
100
个(甚至更多!)微服务,了解这些服务之间的相互作用都会变得很复杂,这也导致
了监控更具挑战性。
考虑一下图
7-2
中的一体化应用程序案例。
负载均衡器(haproxy)
会话存储(Redis)
Web和应用程序服务器
数据库(PostgreSQL)
图 7-2:一个简单的一体化应用程序架构
应用程序监控
|
75
图
7-2
很容易理解也很直观,就是说明请求进来、结果出去,以及中间发生了什么。记住,
一个一体化应用程序并非一定要运行在一台服务器上,案例中展示了一个水平扩展横跨 ...
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数据科学实战

Michael R. Brzustowicz, PhD
可编程网络自动化

可编程网络自动化

Jason Edelman, Scott S. Lowe, Matt Oswalt
精通模块化JavaScript

精通模块化JavaScript

Nicolás Bevacqua

Publisher Resources

ISBN: 9787115550750