Usage Stats Processor

Service that processes usage statistics for analytics and billing

Service

Overview

The Usage Stats Processor service handles high-volume processing of usage statistics. It’s optimized for batch processing with large batch sizes and batching windows to efficiently process usage data for analytics and billing purposes.

View the changelog

Want to know the history of this service? View the change logs

Contact the team

Any questions? Feel free to contact the owners

Receives 1 messages

This service receives messages from other services

Architecture diagram

Performance Characteristics

  • Batch Size: Up to 1000 messages per batch
  • Batching Window: 60 seconds maximum
  • Processing: Optimized for high-volume throughput
  • Storage: Aggregates and stores usage data for analytics

Use Cases

  • API Usage Tracking: Track API calls per tenant
  • Feature Usage: Monitor feature usage across tenants
  • Billing Calculations: Calculate usage-based billing
  • Analytics: Generate usage reports and analytics
  • Monitoring: Monitor system usage patterns

Processing Flow

How Usage Stats Processor Works

  1. Receive Batch

    Large batch of usage stat messages is received (up to 1000 messages)

  2. Aggregate Data

    Usage data is aggregated by tenant, feature, and time period

  3. Store Statistics

    Aggregated statistics are stored in the database

  4. Update Billing

    Usage data is used to update billing calculations

  5. Generate Reports

    Usage reports are generated for analytics

Integration

The Usage Stats Processor integrates with:

  • Database: For storing aggregated usage statistics
  • Billing Service: For usage-based billing calculations
  • Analytics Service: For generating reports
Event-driven architecture documentation: Impulsell