feathersjs / feathers

The API and real-time application framework
https://feathersjs.com
MIT License
15.08k stars 752 forks source link

Tips on deploying to production cloud services? #3448

Closed juw177 closed 7 months ago

juw177 commented 8 months ago

I have been running feathers locally and I love it. It is a small site with websockets API, SQL.

But I am stuck on how to get the feathers backend into production, preferrably AWS. Is it much different to your typical express on ec2? I am guessing because of websockets, serverless is not a viable option?

It also needs to securely upload / download 100mb files, is something like S3 presigned URLs a good option for this or should I upload it from feathers hook via ec2? I have read this guide using feathers-blob, is it still relevent if I change express to use koa body parser? (https://feathersjs.com/cookbook/express/file-uploading)

Google isn't providing many definitive answers and many are outdated. Can anyone can give a few pointers? Thank you.

Justice-Udehegbunam commented 8 months ago

Hi there,

Thank you for sharing your experience with Feathers and your interest in deploying it to AWS. I'd be glad to offer some insights and pointers based on my experience.

Deploying Feathers Backend on AWS Deploying Feathers on AWS EC2 isn't significantly different from deploying a typical Express application. However, you'll need to ensure that your EC2 instance is configured to support websockets, especially since your application relies on them. While serverless architectures might not be ideal for websockets, other AWS services like ECS or EKS could be considered for containerized deployments, offering scalability and manageability. Secure File Upload/Download Utilizing S3 presigned URLs is a solid choice for securely handling file uploads and downloads. This approach provides a secure way to generate temporary URLs for accessing S3 objects without exposing your AWS credentials. While uploading files directly from Feathers hooks via EC2 is possible, it might require more setup and management compared to leveraging S3 presigned URLs. Relevance of Feathers-blob and Koa Body Parser Feathers-blob can still be relevant even if you transition from Express to Koa. It provides convenient abstractions for handling file uploads, and you can adapt the provided guide to work with Koa's body parser. The core concepts should remain applicable. Addressing Outdated Information I understand the frustration of finding up-to-date resources. I recommend checking the Feathers documentation and community forums for the latest information and best practices. Additionally, engaging with the community can provide valuable insights and support. I hope these pointers help you move forward with your deployment to AWS. If you have any further questions or need clarification on anything, feel free to ask!

Best regards, Justice-Udehegbunam

juw177 commented 8 months ago

Wow, thanks for the helpful answer. Yes, would love to engage with the community, and sorry I didnt know where to post this. Should this be asked on github discussions board / discord?

Justice-Udehegbunam commented 7 months ago

depending on your network of people but i think discord is better

On Mon, Mar 18, 2024 at 11:39 PM juw177 @.***> wrote:

Wow, thanks for the helpful answer. Yes, would love to engage with the community, and sorry I didnt know where to post this. Should this be asked on github discussions board / discord?

— Reply to this email directly, view it on GitHub https://github.com/feathersjs/feathers/issues/3448#issuecomment-2005171819, or unsubscribe https://github.com/notifications/unsubscribe-auth/BBTMWBZOIAK2ZTPKZVRGKZLYY5UJPAVCNFSM6AAAAABE2SBLS2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBVGE3TCOBRHE . You are receiving this because you commented.Message ID: @.***>