~/talk

Using Go to Scale Audit Logging at Cloudflare

Talkat GopherCon UK 2024 · 2024-08-14..08-16· [go, observability]
links:none on file
slides:none on file

Cloudflare builds the audit pipeline in Go using Kafka, Kubernetes and Redis and faces a jump from ~3.2k msgs/s for one product to ~2.5–3k msgs/s systemwide while consumers only process ~450–600 msgs/s. Bottlenecks are a >5s request->audit transform, slow downstream enrichments and per-row DB inserts. Solutions: batch consumption (batch size 500, flush 5s), increase partitions from 3 to 6 and run four pods, transform in parallel with goroutines/channels, cache enrichments in Redis and use batch DB inserts — transform time falls to ~3s and DB latency drops.

AI-written summary · about

  1. 0:00Scaling audit logs with Go
  2. 1:24Why audit logs matter
  3. 3:12Cloudflare’s Go architecture
  4. 4:16What are audit logs
  5. 6:22Audit log pipeline
  6. 7:03Kafka for event streaming
  7. 8:48Scaling audit logs challenges
  8. 10:36Bottlenecks with metrics profiling
  9. 13:07Profiling transformation delays
  10. 14:12Database insertion hurdle
  11. 15:18Kubernetes Kafka scaling
  12. 16:22Kafka consumer groups
  13. 18:55Kafka batch consumption
  14. 20:20Optimizing consumer groups
  15. 21:24Go concurrency
  16. 22:50Goroutines for requests
  17. 23:31Redis caching
  18. 24:15Batch DB insertion
  19. 24:58Key takeaways
  20. 25:41Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.