At SoundCloud we managed to break away from the monolith while delivering key business features. Our journey towards a microservices architecture has not been a straightforward one. We experimented a lot to reach the set of tools and technologies that we use today. We changed how we build our applications. We introduced specific apis for our mobile and web clients. We call them BFFs (backend for the frontend). They became the central piece of SoundCloud’s architecture. We rethought how we monitor our services. We created a service registry for knowledge sharing. While making all these changes, we benefited from the learnings of our peer companies. This talk will share our learnings from this journey: what worked for us and what we moved away from.
67. Prometheus
Scalable data collection
Operational simplicity
Multi-dimensional data
Powerful query language
https://developers.soundcloud.com/blog/prometheus-monitoring-at-soundcloud
http://prometheus.io/
75. Prometheus
My Service
jvm client
My Service
jvm client
My Service
jvm client
My Service
jvm client
My Service
jvm client
My Service
jvm client
My Service
jvm client
My Service
jvm client
My Service
jvm client
My Service
jvm client
76.
77. val requestCount = telemetry.counter("outgoing_http_requests_total",
"A counter for the HTTP requests",
"service", "method", "status", "statusClass")
send
requestCount
.labels(
serviceName,
request.getMethod,
response.getStatus,
response.getStatusClass
).inc()
78. val requestCount = telemetry.counter("outgoing_http_requests_total",
"A counter for the HTTP requests",
"service", "method", "status", "statusClass")
send
requestCount
.labels(
serviceName,
request.getMethod,
response.getStatus,
response.getStatusClass
).inc()
query SUM(rate(outgoing_http_requests_total{statusClass!="2xx"}[10m]))
by (service, method, status)
93. backstage.soundcloud.com
@pcalcado - How we ended up with microservices
@starcoffe - Why SoundCloud stopped using its own public API
InfoQ - Moving from a Monolith to Microservices at SoundCloud
94. Netflix API Gateway Pattern
http://techblog.netflix.com/2013/01/optimizing-netflix-api.html