Slide 1

Slide 1 text

Performance Monitoring Yan Cui with AOP & AWS by @theburningmonk

Slide 2

Slide 2 text

Server-side Developer @

Slide 3

Slide 3 text

iwi by numbers • 400k+ DAU • ~100m requests/day • 25k+ concurrent users • 1500+ requests/s • 7000+ IO opts/s • 100+ commodity servers • 75ms average latency

Slide 4

Slide 4 text

What is my code doing at runtime?

Slide 5

Slide 5 text

Runtime Monitoring != Profiling

Slide 6

Slide 6 text

Monitoring • Difficult in a distributed environment • Lots of effort to set up

Slide 7

Slide 7 text

Monitoring • Achievable in 3 simple steps 1. Gather runtime data 2. Publish 3. Visualize

Slide 8

Slide 8 text

Gathering Data • Method execution time • Method execution count • Error count • Requires (lots) boilerplate to set up

Slide 9

Slide 9 text

AOP to the rescue!

Slide 10

Slide 10 text

AOP • Aspect Oriented Programming • Cross-Cutting Concerns • PostSharp

Slide 11

Slide 11 text

Image by Mike Rohde PostSharp

Slide 12

Slide 12 text

Code demo goes here

Slide 13

Slide 13 text

Publish • Where to?... • Amazon CloudWatch

Slide 14

Slide 14 text

Visualize

Slide 15

Slide 15 text

Alarms

Slide 16

Slide 16 text

Notifications • Notify via email/SMS

Slide 17

Slide 17 text

Image by Mike Rohde CloudWatch

Slide 18

Slide 18 text

Visualize • Amazon Management Console –Min, Max, Average, Count –Up to 14 days of data –Down to 1 minute intervals

Slide 19

Slide 19 text

Amazon CloudWatch • Cheap • Supports alarms and notifications • Visualization tool

Slide 20

Slide 20 text

AOP + Amazon CloudWatch =

Slide 21

Slide 21 text

What to Monitor? • IO operations • CPU intensive operations • Service entry-points

Slide 22

Slide 22 text

Caution • Overhead • Only monitor what you need • Make it configurable/optional?

Slide 23

Slide 23 text

Thank You! @theburningmonk