Streams vs. Batches

This comparison of Streams and Batches highlights their key differences in timing, volume handling, complexity, and API endpoints, helping you determine the best method for sending data to Maxio.

Choosing the Right Method

  • Use Streams to track and bill for each action instantly.
  • Use Batches for summarizing and submitting large amounts of usage periodically.

Related Articles:

Streams

Streams provide real-time, event-driven processing for high-volume, advanced usage-based billing.

Focus Real-time event ingestion and processing for high-volume, advanced usage-based billing.
Process
  • Events are sent immediately as they occur in your application.
  • Each event is processed and sent via API request to Maxio.
Use Cases
  • High-volume usage scenarios.
  • When immediate tracking and billing are essential.
  • Complex usage models that require detailed event analysis.

 

Quickstart_-_Sending_events-based_usage_in_real_time.png

Diagram of how Streams work

 

Batches

Batches enable scheduled, periodic submission of aggregated usage data for large but less time-sensitive volumes.

Focus Scheduled, periodic submission of usage data for large, but less time-sensitive, volumes.
Process
  • Usage data is collected and sent in batches at scheduled intervals (e.g., nightly).
  • A cron job or similar mechanism picks up where it left off and sends the data to Maxio, either individually or in bulk.
Use Cases
  • Large usage volumes that don't require real-time tracking.
  • When you already have existing batch processes.
  • Simpler usage models where daily or periodic updates are sufficient.

 

Quickstart_-_Sending_metered_usage_in_batch.png

Diagram of how Batches work

Was this article helpful?
0 out of 0 found this helpful