security_monkey icon indicating copy to clipboard operation
security_monkey copied to clipboard

Dashboard is slow when there are many AWS accounts

Open mariusgrigaitis opened this issue 7 years ago • 3 comments

Dashboard loads all issues, etc when total counts and top 20 issues by score is required.

When there are many AWS accounts scanned by SecurityMonkey this creates an issue that Dashboard takes very long time to load and pulls a lot of data which is not required

mariusgrigaitis avatar Feb 09 '17 15:02 mariusgrigaitis

We've made a couple updates here.

  1. The Accounts API is finally respecting the active flag, greatly reducing the number of accounts shown in the dashboard.
  2. I've upped the number of default gunicorn workers from 6 to 12.
  3. Numerous DB performance improvements (Indexes, deferring columns, etc).

What are your thoughts @mariusgrigaitis on where we go from here?

scriptsrc avatar Apr 14 '17 16:04 scriptsrc

My take on this is that we're currently doing query for getting items and then summing them on client-side.

This takes considerable amount of time because we need to fetch all data to client. I'm thinking about "summary" api that returns total counts that we need for dashboard and just displaying them.

Summing on DB side should be very fast operation.

mariusgrigaitis avatar Apr 18 '17 07:04 mariusgrigaitis

Makes sense

scriptsrc avatar Apr 19 '17 05:04 scriptsrc