Replies: 1 comment
-
I think there are probably a bunch of general docs for scaling Django/PostgreSQL applications and tracing performance issues with the appserver processes or database that would apply to Netbox. Runtime state is shared through the database and redis job queue, so as long as all instances are pointing to the same db & redis it shouldn't matter which WSGI workers run on which host, and for local on-disk persistent state, making sure all instances share or sync the uploaded media, scripts, reports and configuration including the Django secret key (used to generate/validate session cookies) is important as well.
Horizontally scaling Django app servers will only help if the problem is not enough app workers though, if the problem is db writes/caching then improving db performance or batching will help more.
If you are creating racks, cables, etc. over the REST API is it possible to batch them and reduce the number of round trips and increase the amount of data that can be flushed at one time in a db transaction? Some API endpoints will take an array of objects to create/update rather than one at a time, look at the REST docs under Creating/Updating Multiple Objects.
https://demo.netbox.dev/static/docs/integrations/rest-api/
—
Mark Tinberg ***@***.***>
Division of Information Technology-Network Services
University of Wisconsin-Madison
…________________________________
From: Thomas Silvestre ***@***.***>
Sent: Tuesday, February 14, 2023 2:20 AM
To: netbox-community/netbox ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [netbox-community/netbox] horizontal scale for performance enhancement (Discussion #11744)
Hi NetBox community,
We're developing an application in front of NetBox api and we're facing some performance issue, mostly for two reasons:
1. we create a lot of racks, devices, cables etc at once and it makes a lot of processing on the netbox side
2. the number of connected users is growing
Is it ok to run multiple instances of NetBox in parallel or should we give more resources to the host and more threads or workers in gunicorn?
Thanks
—
Reply to this email directly, view it on GitHub<#11744>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAS7UM4KIH5LCDHPG7ZVDVDWXM53XANCNFSM6AAAAAAU3HWGMQ>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
thosil
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi NetBox community,
We're developing an application in front of NetBox api and we're facing some performance issue, mostly for two reasons:
Is it ok to run multiple instances of NetBox in parallel or should we give more resources to the host and more threads or workers in gunicorn?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions