Presented at the microservices meetup in Melbourne, Australia
Go kitA Distributed Programming Toolkit
View Slide
Intro• Mark Wolfe• DevOps at Versent• IoT & Distributed Systems
go-kit?!• Composable• Opinionated• Service Orientated• Simple to Deploy
Server Package• Go interfaces• Provides:• Encoding/Decoding• Tracing and Health• Transport, Rate Limiting and Throttling• Discovery
Client Package• Go interfaces• Provides:• Encoding/Decoding• Transport, Pooling, Rate Limiting & Circuit Breaker• Tracing
!Important• Circuit Breaker• Stops thundering herds• prevents sending requests that are likely to fail• Rate Limiter• Enforce upper thresholds on request throughput
Logging• Levels, e.g. Info, Error• Stdout, Stderr• Keyvals or JSON// Output:// foo=123// level=info// level=info msg=hello// level=info msg=hello a=1 b=2
Discovery• Inbuilt Service Discovery• DNS Srv Record• Etcd• Consul
Metrics!• Runtime, Application, Business• Counter, Histogram and Gauges• Stdout, StatsD or Prometheusimport "github.com/go-kit/kit/metrics/expvar"func main() {myCount := expvar.NewCounter("my_count")myCount.Add(1)}
Example Code!
Questions• @wolfeidau on Twitter• https://github.com/wolfeidau• [email protected]
Links• Go Kit• Circuit Breaker Pattern• Dapper, a Large-Scale Distributed Systems TracingInfrastructure• The Zipkin distributed tracing project