Monitoring en troubleshooting van AWS
John Q. Martin
Principal Consultant
Automatisch gegenereerd uit je trace-data: geen handmatige setup

In één oogopslag: groen = op tijd · amber = vertraagd · rood = gestopt

Als je een servicemap opent, ga direct naar alles wat niet groen is.
Klik op een node voor: verdeling van responstijden, uitsplitsing HTTP-status, fouttypes.

API Gateway (50ms)
-> OrderService (50ms)
-> PaymentService (100ms)
-> External API (200ms)
Totaal: 400ms
External API = 50% van totale latency
Vergelijk alternatief pad:
OrderService -> DynamoDB
Totaal: 120ms (snel)


Query 1 (10-30ms)
-> Query 2 (30-50ms)
-> Query 3 (50-70ms)
-> Query 4 (70-90ms)

Gebruikerslijst ophalen (10-20ms)
Details gebruiker 1 ophalen (20-30ms)
Details gebruiker 2 ophalen (30-40ms)
... ×100 sequentiële queries
Oplossing: batchqueries, eager loading
Oplossing: batchverzoeken, message queues, caching

Oplossing: provisioned concurrency, initialisatie optimaliseren
Service A [Error]
-> Service B [Timeout 5s]
-> Service C [Timeout 5s]
-> Database [Timeout 5s]
Overeenkomende timeout-blokken gestapeld door de trace-hiërarchie
Oplossing: timeouts, circuit breakers, fallbacks

Groepen vergelijken:
response_time > 1000ms, sorteer op duur
# Hoge-latency-alarm
aws cloudwatch put-metric-alarm \
--alarm-name HighLatency \
--metric-name ResponseTime \
--namespace AWS/XRay \
--statistic Average \
--period 300 \
--threshold 1000 \
--comparison-operator GreaterThanThreshold
# Hoog foutaantal-alarm
aws cloudwatch put-metric-alarm \
--alarm-name HighErrorCount \
--metric-name ErrorCount \
--namespace AWS/XRay \
--statistic Sum \
--period 300 \
--threshold 50 \
--comparison-operator GreaterThanThreshold
Monitoring en troubleshooting van AWS