trustification / trustify

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

investigate what is throttling api/v1 endpoints

JimFuller-RedHat opened this issue · comments

loadtest revealed

that api/v1 endpoints are being throttled - perhaps there is some default behaviour of actix-web

 Name                     |                                        Status codes 
 ------------------------------------------------------------------------------
 GET /advisories          |                                        33,963 [200]
 GET /api/v1/advisory     |                                           292 [200]
 GET /api/v1/importer     |                                           292 [200]
 GET /api/v1/organization |                                           292 [200]
 GET /api/v1/product      |                                           292 [200]
 GET /api/v1/purl         |                                           292 [200]
 GET /api/v1/purl?q=curl  |                                           292 [200]
 GET /api/v1/sbom         |                                           292 [200]
 GET /api/v1/vulnerabil.. |                                           295 [200]
 GET /importers           |                                        33,964 [200]
 GET /index               |                                        33,968 [200]
 GET /openapi             |                                        33,968 [200]
 GET /packages            |                                        33,963 [200]
 GET /sboms               |                                        33,967 [200]
 POST query advisory wi.. |                                        79,520 [200]
 -------------------------+----------------------------------------------------
 Aggregated               |                                       285,652 [200] 

also open question if such throttling should be done at the app layer eg. this could be done by nginx, etc etc.

I guess this might not be throttling but lack of default pagination in rest endpoints ...though its suspicious that the counts are similar across endpoints eg. most likely this is throttling of some kind.

I think this turned out to be how goose determines groups of http invokes, closing