Upgrade to Pro — share decks privately, control downloads, hide ads and more …

dashflare: The edge is tomorrow

dashflare: The edge is tomorrow

These slides were used in a presentation as part of trivago Tech Week 2020, a virtual event being hosted to promote knowledge exchange and a culture of tech excellence within trivago.
---
How we built a privacy-focused analytics solution using the new possibilities offered by edge computing. The concrete implementation discussed here uses Cloudflare's Edge Workers but the principles are translatable to any other major CDN.

Code: https://github.com/jorgelbg/dashflare

Jorge Luis Betancourt

February 01, 2021
Tweet

More Decks by Jorge Luis Betancourt

Other Decks in Programming

Transcript

  1. EDGE COMPUTING Edge computing is a networking philosophy focused on

    bringing computing as close to the source of data as possible in order to reduce latency and bandwidth use.
  2. EDGE COMPUTING Edge computing is a networking philosophy focused on

    bringing computing as close to the source of data user as possible in order to reduce latency and bandwidth use.
  3. EDGE WORKERS Edge Workers provides a serverless execution environment that

    allows you to create entirely new applications or augment existing ones without configuring or maintaining infrastructure.
  4. Request Response logs/event collection for analytics purposes. • Geolocation information

    • Referrer analysis • User agent segmentation • User sessions (without collecting any personal information) https://www.flaticon.com/authors/pixel-perfect https://www.flaticon.com/authors/srip Origin
  5. Interface / UI? Storage? • Cheap storage • Self hosted

    • GCS/S3 backend • LogQL (PromQL like query language) • Proven UI • Used by both of us (and more) • Out of the box support for Loki (query highlighting & other nice whistles).
  6. CLI tool to interact with your Cloudflare Workers (wrangler) Local

    development environment with wrangler Supports console.log Statements
  7. Host a static website & API A/B Tests (aka CTests)

    Custom routing/caching Logging Intercept & modify any Request / Response Analytics Security