Streaming API and workload (WU)

I’ve been getting a lot of questions about how the streaming API affects workload units (WU).

Here’s the short answer: it’s essentially the same as a regular API call. WU is calculated based on the number of bytes in both the request and the response. The key difference is that a streaming API sends the response in multiple chunks, and each chunk includes a few bytes of metadata. So yes, streaming can technically cost slightly more than a regular JSON call — but we’re talking about bytes here.

The difference is minimal. So keep your eye on the goal:

Does a streaming response give your users a better experience? :white_check_mark: Often, yes.
Is the tiny increase in WU worth that smoother UX? :white_check_mark: Probably yes.
Will the increase in cost be noticeable? :cross_mark: In most cases no.

Optimize for user experience first—cost considerations are totally valid, but if your app delivers real value, your users will cover that cost for you.

Here’s my video covering the streaming API: https://www.youtube.com/watch?v=Qu24Wq2de8w

5 Likes