medama-io / medama

Self-hostable, privacy-focused website analytics.
https://oss.medama.io
388 stars 8 forks source link

fix(core): reduce spam using a threshold system #138

Closed ayuhito closed 2 months ago

ayuhito commented 2 months ago

This introduces a new bot threshold counter where if there are two "Unknown" request elements, we'll drop it as a bot request. This seemed to be the case with most bot requests with our current real world data.

This also slightly reduces memory allocations and usage by using a single map for timezone --> country instead of the previous timezone --> country code --> country since we previously relied on the codes for compression.