Skip to content

theisenmark/faust-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Kafka Streams + Faust POC

Overview

This project serves as a POC for using Kafka Streams and Faust to aggregate API request metrics segmented by high-cardinality client attributes (e.g. user ID).

Getting Setup

Prerequisites

Usage

  1. Install Faust: pip install faust
  2. Start the Faust worker: faust -A windowed_requests worker -l info
  3. In a new terminal window, produce a message to the topic: faust -A windowed_requests send windowed_requests '{"user_id": "7", "path": "/api/v1/data"}'
  4. Fetch the current usage metrics for a given user: curl localhost:6066/metrics/users/7

FAQ

Why not just use Prometheus?

Prometheus is a poor fit for storing high cardinality metrics as discussed in their own documentation and this more in-depth article.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages