roc-toolkit icon indicating copy to clipboard operation
roc-toolkit copied to clipboard

Receiver limits

Open gavv opened this issue 8 years ago • 0 comments

For security and performance reasons, receiver should have configurable limits for all types of resources that are automatically allocated by external events:

  • maximum number of sessions
  • maximum number of packet allocated for a single source address (IP + port)
  • maximum incoming packet queue size (packet::Queue in Receiver)
  • maximum session packet queue size (packet::SortedQueue in ReceiverSession)
  • maximum FEC packet queue size (packet::SortedQueue in fec::Reader)
  • maximum FEC block size (core::Array in fec::Reader and fec::OFDecoder)
  • maximum number of packets that are read from the packet queue every tick (Receiver::fetch_packets_)
  • maximum packet size (we already has it)

It's not necessary to provide the user with an individual configuration option for every limit. Three options would be enough, likely:

  • maximum number of sessions
  • maximum number of packets per client/session
  • maximum packet size (we already has it)

These options should be added to pipeline config (src/modules/roc_pipeline/config.h) and exported via API (src/lib/include/roc/config.h) and command-line parameters (src/tools). Other limits may be deduced from these options.

Useful docs: https://roc-streaming.org/toolkit/docs/internals/data_flow.html

gavv avatar Sep 09 '17 08:09 gavv