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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
370
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
新卒PdEのリアル
ryu1013
1
490
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
6.8k
iOSDC Japan 2026 - Swiftで作って学ぼう!データベース自作入門
kaseken
2
160
App Intentsのビルドプロセスを支える技術
kntkymt
0
350
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
710
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
140
Swift愛好会100回記念 第1回を振り返る
jollyjoester
0
120
XHTMLが残したもの
yosuke_furukawa
PRO
2
790
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
380
What We Talk About When We Talk About XP
m_seki
2
610
cdk deploy JawsSonic #MARATHONしながらAWSリソースをデプロイしてみよう
akihisaikeda
2
130
【高い買い物LT会】初任給で話題の国産フィジカルAIを買った話
akagami
PRO
0
150
Featured
See All Featured
Heart Work Chapter 1 - Part 1
lfama
PRO
9
36k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.3k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
540
Making the Leap to Tech Lead
cromwellryan
135
10k
How to Talk to Developers About Accessibility
jct
2
550
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
660
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
Accessibility Awareness
sabderemane
1
210
Designing for humans not robots
tammielis
254
26k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
410
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
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]