Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Monitoring & Profiling at ResearchGate
Search
Bastian Hofmann
November 30, 2016
Programming
280
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Monitoring & Profiling at ResearchGate
Bastian Hofmann
November 30, 2016
More Decks by Bastian Hofmann
See All by Bastian Hofmann
Monitoring in Kubernetes with Prometheus and Grafana
bastianhofmann
0
380
Creating a fast Kubernetes Development Workflow
bastianhofmann
0
150
Highly available cross-region deployments with Kubernetes
bastianhofmann
1
180
From source to Kubernetes in 30 minutes
bastianhofmann
0
200
Introduction to Kubernetes
bastianhofmann
1
140
CI/CD with Kubernetes
bastianhofmann
0
250
Creating a fast Kubernetes Development Workflow
bastianhofmann
1
290
Deploying your first Micro-Service application to Kubernetes
bastianhofmann
2
220
Creating a fast Kubernetes Development Workflow
bastianhofmann
0
280
Other Decks in Programming
See All in Programming
ゲームコントローラやキーボードのファームウェアをSwiftで書く
kishikawakatsumi
1
270
技術的負債の返済は、AI時代の複利で効く投資 — 経営としての意思決定とその遂行
curekoshimizu
1
2.1k
JRuby: Past, Present, and Future
headius
0
220
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
470
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
330
プロダクトコードからライブラリの境界を見つける
elmetal
PRO
0
100
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1.1k
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
430
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
480
大喜利で理解するLLM as a Judge / Understanding LLM-as-a-Judge through Ogiri
rockname
0
190
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
700
FreeBSDでZabbixを動かす
kenkino
0
350
Featured
See All Featured
Become a Pro
speakerdeck
PRO
31
6.3k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1k
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.7k
Automating Front-end Workflow
addyosmani
1369
210k
Designing for Timeless Needs
cassininazir
1
520
The Limits of Empathy - UXLibs8
cassininazir
1
700
RailsConf 2023
tenderlove
30
1.6k
Side Projects
sachag
456
43k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.3k
Building Adaptive Systems
keathley
44
3.2k
WCS-LA-2024
lcolladotor
0
840
Transcript
Monitoring and Profiling at ResearchGate @BastianHofmann
None
http://www.alexa.com/
11 million users
193 countries
~1800 request/s
lots of data
>100 million publications
~ 140 components
~ 400 repositories
haproxy node memcache postgresql mongodb solr infinispan hbase mongodb solr
community services
+ async events, stream and batch processing
We need to know whats going on
Monitoring
Logging
Profiling
Real-Time
Many roads
None
Logging
Error Logs
Access Logs
Enrich with additional information
We turn Notices, Warnings, Errors into Exceptions
set_error_handler( function($errno, $msg, $file, $line) { switch ($errno) { case
E_RECOVERABLE_ERROR: case E_USER_ERROR: throw new \ErrorException($msg, null, $errno, $file, $line); case E_WARNING: case E_USER_WARNING: case E_CORE_WARNING: case E_COMPILE_WARNING: throw new WarningException($msg, null, $errno, $file, $line); case E_NOTICE: case E_USER_NOTICE: throw new NoticeException($msg, null, $errno, $file, $line); case E_STRICT: throw new StrictException($msg, null, $errno, $file, $line); } return true; }); $a = []; try { $b = $a['doesNotExist']; } catch (NoticeException $e) { }
Log as JSON
Correlation with logs from other services
web server http service http service http service http service
create unique trace_id for request user request trace_id trace_id trace_id trace_id log log log log log
None
Central log management
Aggregated in a central place
Easily full-text searchable
Always Log to file
Logstash + Elasticsearch + Kibana
Logstash elasticsearch webserver webserver webserver AMQP log log log logstash
logstash logstash
Kibana http://www.elasticsearch.org/overview/kibana/
None
Monitoring
Graphite http://graphite.wikidot.com/
None
StatsD https://github.com/etsy/statsd/
webserver webserver webserver statsd statsd statsd graphite
What do we measure?
Business Metrics
Technical Metrics
Error rates
Database Queries
HTTP calls
Cache access
Rendering time
…
Response Times
Easiest approach: Get it out of the access log
192.168.56.1 - - [09/Jul/2012:19:18:19 +0200] "GET /rg_trunk/webroot/c/af10c/ images/template/rg_logo_default.png HTTP/ 1.1"
200 882 "http://devm/rg_trunk/webroot/ directory/publications/"
Or measure it in your PHP process
Is this actually what we want to measure?
http://www.stevesouders.com/blog/2012/02/10/the-performance-golden-rule/
None
None
None
Navigation Timing API https://developer.mozilla.org/en-US/docs/ Navigation_timing
None
Profiling
XHProf with tideways.io Extension https://github.com/tideways/php-profiler-extension
XHGUI https://github.com/perftools/xhgui
None
None
None
None
Active in production for a subset of requests
Symfony Debug Toolbar
None
None
Extend it http://symfony.com/doc/current/cookbook/profiler/ data_collector.html
None
None
None
None
None
Active in production for a subset of requests
Alerts
None
Dashboards
None
None
None
None
http://twitter.com/BastianHofmann http://profiles.google.com/bashofmann http://lanyrd.com/people/BastianHofmann http://speakerdeck.com/u/bastianhofmann https://github.com/bashofmann https://www.researchgate.net/profile/Bastian_Hofmann/
[email protected]