Backpressure

 Backpressure


  Backpressure occurs because inflow tasks are outstripping our ability to process the data. Perhaps a denial-of-service attack is underway, rendering lots of data without pagination, or constrained shared resource such as a network printer.  Backpressure occurs more often in web/cloud environments when scaling challenges are encountered. 

  


Strategies

  • Better Design -  a) Minimize Rendering - ex: design your customer grid to be on a tabbed notebook page or page that can be pinned, so does not need to populate the grid if not seen. ex2: add collapsible areas so user can control. ex3: have menus to take you to a different screen. ex4: pagination of grids; b) Minimize Data Traffic - ex: design your web page to only download to client first time and only send out updates when updates occur or user does action such as key strokes.  ex2: Filtering as specifically as possible, before retrieving data.
  • Buffer/Queue - accumulate incoming data spikes temporarily, but this is switching to potential memory issue by deferring things
  • Control the producer (block/slow down/speed up is decided by consumer). Locking mechanisms, synchronous programming, token ring network, block lists, security permission checking and blocking unless explicitly white listed.
  • Drop (sample a percentage of the incoming data) - ex: a "first person shooter" skipping ray casting of objects behind walls. 
  • Hand Off - ex: Load Balancer - manager switches to another processor when some processor is overwhelmed. ex2: Asynchronous programming - throw to another CPU.  
  • Ignore Backpressure 
  • Improve Capacity - ex: add more memory, upgrade the processor, etc.
  • Progressive Rendering - ex. start with low quality or resolution image and as more data arrives sharpen the resolution
  • Subscribe rather than polling

Comments

Popular posts from this blog

Upgrading to .NET8 from desktop versions 4.8.X

GHL Chat Bots for Webpage

GHL > Set website so shorter URL address