Hello, I’ve got 2 services, main API and microservice which generates files.
Instead of returning file from microservice (they can be big and our transport protocol handle only 1mb messages) we are storing file locally and just simply return link to our API which downloads it.
Now we have problem with app platform because we can’t get this file from another service.
We would not like to use spaces, because it takes precious miliseconds for uploading the file.
Is there a way we can access filed on microservice from our API?
Thanks!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there,
Storing files on the local file system of your App platform components is not really recommended, because the app instances are ephemeral, and are being continuously created and destroyed as the app is scaled, redeployed, etc, and any changes to the filesystem will be destroyed with the instance. This means that every redeployment of your app will reset the filesystem.
If this is alright for your use case, what you could do is to store your files in a publicly accessible directory (eg. a directory exposed to the ${PUBLIC_URL}), so that you could download them via HTTP requests.
Best,
Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.