nautobot-app-ssot icon indicating copy to clipboard operation
nautobot-app-ssot copied to clipboard

Support bulk operations

Open lampwins opened this issue 2 years ago • 3 comments

Environment

  • Nautobot version: 1.2.5
  • nautobot-ssot version: 1.1.0

Proposed Functionality

As a Tools Integrator, I want the SSoT plugin to support bulk operations within the nautobot ORM (or other target systems which support like functionality) so that jobs that deal with a lot of data can operate more performantly.

Use Case

I have several use cases which involve full inventory syncs between systems involving upwards of 75k+ objects. The run time of these jobs is currently measured in hours due to the serial nature of processing objects after the diff is calculated.

There is a tradeoff in nautobot concerning bulk ORM operations (bulk_create, bulk_update, etc) in terms of change logging and other signally, but in my case, I am willing to accept those downsides to be able to process the SSoT sync with better performance.

lampwins avatar Feb 12 '22 08:02 lampwins

To some extent it may be possible to implement this by implementing deferred create/update/delete operations and using the DiffSync sync_complete callback to perform the requisite bulk operations. See https://blog.networktocode.com/post/advanced-ssot-app/ for some simple examples.

glennmatthews avatar Feb 14 '22 13:02 glennmatthews

@lampwins @glennmatthews are there any plans in Nautobot Core to support ORM bulk operations while updating the changelog?

chadell avatar Dec 13 '22 17:12 chadell

Non-trivial to support since by design ORM bulk operations do not trigger signals.

glennmatthews avatar Dec 13 '22 17:12 glennmatthews