Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
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
170
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
210
Creating a fast Kubernetes Development Workflow
bastianhofmann
0
280
Other Decks in Programming
See All in Programming
2年かけて Deno に DOMMatrix を実装した話 / How I implemented DOMMatrix in Deno over two years
petamoriken
0
220
【QA Test Talk Vol.8】AI-DLC による Whole Team Approach の加速
pkshadeck
PRO
0
220
Claude Code全社展開のためにやったことn選~プラグイン302個・コミッター271人を支えるために~
kenchan
5
1.6k
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
510
Go を使い始めて 2 ヶ月の学び / My first two months with Go
contour_gara
0
350
テーブルをDELETEした
yuzneri
0
150
プロポーザルを書いてもらう
pvcresin
0
570
人間の目はかわらない、だからJPEGは30年もつ
yuzneri
12
19k
レビュー履歴をAIに食わせて、 Compose移行を加速するs
shihochan
0
170
言葉の格闘技のススメ~紙とペンと言葉から始める、キャリアの描き方~
progresscicada
2
170
<title><a id="</title>君はこのHTMLをパースできるか"></a></title> #雑LT_study
pizzacat83
0
170
KotlinConf Extended South Korea 2026 Keynote
l2hyunwoo
0
120
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
97
6.8k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.2k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
390
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
500
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Prompt Engineering for Job Search
mfonobong
0
410
We Have a Design System, Now What?
morganepeng
55
8.3k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
Speed Design
sergeychernyshev
33
2k
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]