kytos-ng / flow_manager

Kytos NApp that manages OpenFlow 1.3 entries
https://kytos-ng.github.io/api/flow_manager.html
MIT License
0 stars 7 forks source link

chore/test: try to filter 300 cookie_range values/pairs on `GET /api/kytos/flow_manager/v2/stored_flows` #176

Closed viniarck closed 11 months ago

viniarck commented 11 months ago

The URL on GET /api/kytos/flow_manager/v2/stored_flows can end up relatively large if a client is filtering for many cookies, we need to double check if unicorn might end up limiting or complaining about the url size and maybe also set it to be larger or move this arg to the body or the request if needed. telemetry_int is trying to optimally filter for the EVCs upfront so we might end up with hundreds of pairs here, so let's test this out.

I'll investigate and test this out tomorrow.

viniarck commented 11 months ago

Also, typically nginx on deployments will be in front of it, so the safest route might be to also accept cookie_range both on query args and request body, and if a client is sending a list that might be big then the client should send it via the request body.

viniarck commented 11 months ago

The good news is that uvicorn doesn't have a hard coded limit for the URI length, so requests going directly over uvicorn instead of hitting nginx wouldn't be an issue. Although it also wastes more bytes to represent the same thing, plus in the request logs it'd be a very large log line, a bit noisy, capturing with wireshark with 500 cookies it resulted in a 16k byte GET header, whereas with json it resulted in 4798 bytes, so clients which will be filtering for hundreds of cookies should prefer to pass the cookie_range filter via json body.

20231130_120832 20231130_120853

viniarck commented 11 months ago

For future reference regarding nginx default limit values: https://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size