Search code examples
amazon-s3parse-platformparse-server

Serving files via Api vs Direct link, S3 adapter


This is a general question.

We are hosting out parse-server on AWS beanstalk, and using the AWS-S3 adapter for files.

In the S3 Adapter configuration on parse-server if (directAccess is set to true) fetching a file from parse will return the actual file URL from S3 (http://bucket.aws..../)

Now, if we set the configuration (directAccess is set to false), parse will serve file URL masking the link like this (http://parse-server-url/parse/files/filename.png)

My main concern/wondering is that if we go with the second option (directAccess is set to false). Will accessing files require additional load on our instances running the server ? Will parse-server download the file to cache then serve it to the requesting application ?

For example if we need to serve objects containing files of image, will it be more efficient to let parse pass the full URL and let the Application/client handle the rest ? or it doesn't matter ?


Solution

  • If you disable directAccess Parse-server will act as a proxy and effectively consume CPU time to process such requests. There’s no file cache on Parse server, so all requests will be forwarded to your AWS buckets and then served back to the client. Hope that helps.