Ask HN: Analytics for python web app

2 points by Kpourdeilami ↗ HN
Hello HN,

I'm using Mixpanel to track the requests made to my API endpoints to track usage and calculate the users' monthly bills but the network calls to Mixpanel's API increases the request processing time significantly.

Currently, I'm leaning towards setting up Kafka behind a VPN and writing to it than having an event consumer transfer the Kafka buffer to Mixpanel every 15 minutes.

I was wondering if this is the correct approach or any analytics solutions exist out there that already do this so I don't have to make it from scratch?

Thanks

4 comments

[ 2.3 ms ] story [ 15.8 ms ] thread
Hi there,

What's your billing model like? Is it time-based or hit-based?

It's time-based. For example, if a request takes 1 second to process then the user will be charged 1000 * (millisecond price)
Was there any reason why you went with Mixpanel? For accuracy purposes, I reckon it'd be better to go something server side.
I had used Mixpanel before in building apps and went with it for familiarity. I agree with you, it seems like building it server-side would be a better solution