I have a moderately sized web app (a content aggregator) with features like session management, authentication, CRUD endpoints, etc all under a single monolithic project. I am planning on forking the code to work for another project but this time around I would like to refactor its architecture to be as serverless and managed as possible. I developed it before serverless was as widespread and being that it was a bit of a personal project I never gave much thought to optimizing its deployment architecture. All of the components were hosted on a single monolithic VPS. Its a Node JS app that uses express to handle requests with Mongo DB as the database. The app was in production and I would constantly experience outages due to either running out of memory or because the VPS network was down which is primarily what I am trying to resolve. The other consideration I have in mind is that even though I want to make it as modular as possible I want to be conscious of my time so I am not looking to spend a hundred more hours refactoring and rewriting things.At first I started looking at AWS Lambda but I have about 100 API endpoints using express for all the different operations therefore it would be very error prone and cumbersome to try and convert all of them into individual lambda functions. What AWS service can i use to deploy it again under a managed instance that is similar to Lambda in that it bills only for what you use but is still a solution where the entire node js app is deployed like in a VPS and it automatically handles scaling, and load balancing. Also I have never used Mongodb atlas so what are your thoughts on it? I really dont want to refactor to use DynamoDB, I have things like aggregate queries which I would need to learn how to re implement and then rewrite it all over again. Also S3 buckets is what I should be looking at to store static assets such as user photos, etc. Thanks
Submitted July 18, 2020 at 04:10AM by leboi22
No comments:
Post a Comment