I'm using Python on GAE, and I want to serve large files to my users. But only to those who have been authenticated through custom authentication (i.e. not google).
The question is how to do this most efficiently. I recon since the authentication is custom, the request has to go through GAE. I cannot just use a static file somewhere. So GAE needs to read this file, and send it to the user.
The way I've thought of doing it is to upload a file to cloud storage, and then read it through GAE and send it if the user is authenticated. But I'm not sure this would be the best way to go about it. Wouldn't this virtually double the cost? First GAE reads from cloud storage (bandwidth cost), and then send it to user (bandwidth cost).
Another concern I have is how long GAE can maintain a connection. These files are rather big, so sending it could take some time.
I'm at a bit of a loss here since I haven't done this kind of thing before. I'm not sure what the best approach is, or if the one I've suggested is even viable.
Any guidance or tips would be greatly appreciated.
Thanks!