question

Upvotes
Accepted
11 1 1 5

When is pause / resume more efficient then stop?

I am planning to have requests with interest open for many items.

I expect for high volume / high popularity items the streams will remain open most (if not all) day and likely will not be paused or uninitialized (specifically Level 1 and Level 2 Market Data).

However, I would like to optimize streams for less popular items so I do no stream data that is not being requested by users.

Would pause/resume be the right approach to take for these less popular items that will not require all day long open streams? At what point is pause/resume less efficient then simply uninitializing the stream for particular items followed by new request to stream with interest?

On a similar note, how long is it acceptable to pause items for? Seconds, Minutes, Hours etc before you should uninitialize the paused stream?

ema-apistreaming-data
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Upvotes
Accepted
17.2k 47 13 19

Hi @mzmuda33,

When a stream is paused, the updates are not delivered to the application by the infrastructure, but the last mile infra components continue to receive the data from the headend. This is useful when immediate lowest latency start of the stream is required.

In the absence of the paused stream, a new request is sent upstream to the headend (if it is not in cache already), which can add a bit of time (hundreds of milliseconds), before the data start flowing for that item.

You will have to prototype and see what option works best in your use case, but I think need-based subscription to an item should work fine.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.