security_monkey
security_monkey copied to clipboard
Dashboard is slow when there are many AWS accounts
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
We've made a couple updates here.
- The Accounts API is finally respecting the active flag, greatly reducing the number of accounts shown in the dashboard.
- I've upped the number of default gunicorn workers from 6 to 12.
- Numerous DB performance improvements (Indexes, deferring columns, etc).
What are your thoughts @mariusgrigaitis on where we go from here?
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.
Makes sense