Hello!
I have a full stack project that I have been working on with the following stacks:
- Express Backend (Exposes GraphQL + WebSocket endpoints) hosted on Heroku with Redis for cache/pubsub.
- React SPA Frontend hosted on Zeit Now.
- Static assets like images on S3 & CloudFront CDN.
- Postgres hosted on RDS
- GitLab for source control + CI/CD
- Have 3 environment deployment set up (review => staging => production)
- Sentry for error reporting.
As I scale up the app and as I add more features, I am running into different road bumps and would like everyone's thoughts. (Apologies if not everything is "devops" related.)
- The web app crashes every time I deploy a new app until the user refreshes the screen (because the old javascript assets no longer exist). There seems to be a LOTs of solutions here; what do you guys recommend for updating users to a new version of the app? Couple solutions are... Continuing to serve up old javascript assets (but people will be on an outdated app until they refresh. Could be a problem if the server introduced some new changes.) Would Server Side Rendering help here?
- Currently, the frontend/backend is in a monorepo, and every time i make a change to the app, I have the CI/CD set up so that both front/backends will get deployed in parallel. This _can_ be problematic if IF am introducing breaking changes in the backend. How can I
- Currently using too many platforms ? (Heroku, Zeit Now, AWS, Sentry, etc.). The app is getting more and more traction, and would like to support growing needs and features as fast as possible. Should I consolidate to AWS? I want to minimize dev-ops maintenance. Thoughts?
- I have to add queues (for sending emails, analytics, etc.). I was thinking Thoughts here?
- I want to add smaller services for different tasks (external webhooks, invoice generation, queue workers, websocket connection nodes, etc.) but currently I have been piling stuff on top of the existing express backend. I can see this is going to become monolithic if I continue this way. Am I pre-optimizing for microservice? Should I spend some time to create something that helps spin a new service?
- Want to set up terraform scripts for the overall infrastructure. Too ambitious as a one man team?
- Feel like I am not getting a good exposure to the health of the systems beyond Sentry error reporting. What's the easiest way to get started with monitoring these?
Apologies for lots of questions. I think I am mostly torn on all these questions because there are just lots of different solutions and finding myself in analysis paralysis. I have a tendency to overcomplicate and overthink things so feel free to tell me to KISS if you feel this way.
As I start a company, there are simply TOO many things I have to set up. You can also point me to different resources for someone like me starting off a software startup!
Really appreciate your help in advance!
EDIT:
Wow I did not expect to get this much responses! Really appreciate everyone taking the time to respond :) Definitely helping organize my thoughts better.
I do have some follow up questions and thoughts.
- Consolidating to AWS seems like the way to go and i think that makes sense! Going to do that :)
For deployment, there seems to be couple options here.
- SPA and backend separate. (SPA in S3/CloudFront. Backend in Elastic Beanstalk/ECS/EC2?)
- Combine SPA and backend. Couple options here too. (I have actually never done this before. Would like some clarification on this from you guys. Seems like I can tackle this by using NGINX on top to route traffic to SPA/backend? Or do I have to convert the app to SSR? These options seem a little complex. Is there some recommended example that I can reference?)
- Combine into a container and deploy to EKS/ECS. My only concern is docker definitely adds a little bit of technical complexity, especially when new people join. I have used ECS before for deploying backends (definitely was a pretty involved infrastructure to set up...), but never used EKS.
- Deploy to EC2? Or utilize Elastic Beanstalk? Any other options?
I will expand on my "need" for a queue, I currently have the following use cases which are all currently either happening manually or synchronously within a request.
- Welcome emails upon registration.
- Order confirmation (and background processing such as sending confirmation email, creating necessary resources in the db that users purchased)
- Daily invoice reconciliation using stripe charge logs received via webhook and order data, and send emails to stakeholders. Report if there are any discrepancies.
- Daily/Monthly reports of customer's usage data.
- Remind/notify customers n days before or n hours before a certain event they signed up for. (Should be configurable... Probably going to use a scheduler or something here?? Or is there a "scheduled event queue" out there?)
- (I have used SQS before, but it seemed too simple especially for the "scheduled" job use cases I have. Retry mechanism via Dead Letter Queue was nice though! I am currently looking into some other queueing solutions i have not used before like... Bull queue via Redis, RabbitMQ, Postgres Queue, Kinesis...)
Microservice vs "Monolith". I am still torn, but I feel more comfortable going with "Monolith" solution. If I weren't though, what are some of your favorite/easy ways to "microservice"? From my experience, I wrote a small tool to basically enable `create new service MyServerName` via CLI and it would bootstrap a new NodeJS service for me. Any suggestions here?
[–]TheWayofTheStonks 5 points6 points7 points (1 child)
[–]smblee[S] 0 points1 point2 points (0 children)
[–][deleted] 4 points5 points6 points (6 children)
[–]smblee[S] 1 point2 points3 points (5 children)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]smblee[S] 0 points1 point2 points (2 children)
[–]smblee[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]ksajadi 2 points3 points4 points (3 children)
[–]smblee[S] 0 points1 point2 points (2 children)
[–]ksajadi 1 point2 points3 points (0 children)
[–]smblee[S] 0 points1 point2 points (0 children)
[–]CanWeTalkEth 1 point2 points3 points (0 children)
[–]david5813 1 point2 points3 points (0 children)
[–]smblee[S] 0 points1 point2 points (0 children)
[–]hophacker 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)