This concerns the `/isos` API endpoint and the re-write from Perl to Go. The 
endpoint provides users a way to generate and download an ISO [0]. Currently it 
has two modes:

- stream=true: The response is the ISO file that the user receives as a 
download. Nothing is permanently saved on TO servers in this case, instead the 
data is streamed directly to the client.
- stream=false: The response contains a link to download the ISO file. 
TrafficOps saves the ISO file on the server’s filesystem for a later download 
by the client.

The stream=false mode has a few shortcomings:
- The generated files will either eventually fill up the server’s disk or need 
to be periodically deleted (breaking the download links).
- Clients must be routed directly to the TrafficOps server that contains the 
ISO file, which can be complicated in a setup where multiple TrafficOps are 
fronted by a load balancer. It also requires exposing the TrafficOps server 
when otherwise not necessary.

I propose returning a user-friendly error when stream=false, essentially 
restricting users to stream=true. Operators wishing to allow stream=false can 
blacklist the route and force Perl to handle it. Barring objections, I’ll 
include this as part of the re-write from Perl to Go.

[0] https://traffic-control-cdn.readthedocs.io/en/latest/api/isos.html#isos

Reply via email to