redhat-performance / quads

:calendar: The infrastructure deployment time machine
https://quads.dev
GNU General Public License v3.0
88 stars 36 forks source link

[PERF] improve quads-web render performance for large amounts of hosts #540

Closed sadsfae closed 3 weeks ago

sadsfae commented 4 weeks ago

Summary

In QUADS 2.1.0 we moved to generating and hosting the dynamic wiki, inventory and pages directly from flask and our APIv3 via a separate gunicorn process e.g. quads-web instead of generating the same data in markdown as a separate process and then pushing that over a Python XMLRPC interface into Wordpress via an API.

Problem Details

We are seeing slow page render times for /assignments and /inventory when a large amount of hosts (1000+ or more) are actively scheduled. This has evaded us in our testing in smaller environments due to not running this at such a large scale in the Scale Lab (1200+ hosts, actively scheduled). This is not evident in smaller environments.

Page Load Observations

Page Avg Load Time Nginx Payload Render Page Size Scheduled Hosts Total Hosts Active Env All Hosts Render per Host Per Scheduled Host Render
/assignments 50 sec 1-3 sec 2584 KB 1064 1172 37 40ms 44ms
/inventory 35 sec 1-3 sec 829 KB 1064 1172 37 27ms 30ms

Page Render Mechanics