Feedback on microservices app with AWS - services selection and infrastructure design

0

I am working on my first-ever microservice architecutre + AWS infrastructure just for practice/learning. I was just wondering if I could have some guidance regarding my AWS services selection + my architecture design to ensure that I am on the right path before I begin. Any help at all would be really appreciated!

The project is simple, I am making a task management application (users can create, manage, and track tasks. The application will support user authentication, task management (create, read, update, delete), and notifications for task deadlines and completions.)

This is the high-level architecture that I planned out:

  • Frontend will be built with Next.js, hosted on AWS Amplify, and served through AWS CloudFront. I saw some people mention they deployed their front-end using S3 instead but I wasn't sure about that
  • 3 Microservices for the backend using Node.js/Express.js: User Service, Task Service, Notification Service. The services will be run using Amazon EKS
  • AWS API Gateway to route requests to the appropriate microservice.
  • Notifications will use WebSockets (and maybe Amazon SNS)
  • Data will be stored on Amazon DynamoDB
  • Elastic Load Balancer will be used to distribute traffic among the instances in the EKS cluster
  • Route 53 for domain name management and DNS routing
  • Jenkins integrated with Code Pipline for CI/CD workflow
  • CloudWatch for monitoring applications and AWS resources

Basically, am I missing anything vital, or am I doing anything wrong?

This is my architectural design, but I am not sure if this is the correct representation. I tried to follow off of what I could find online, so I am not sure if this is accurate. If you have any remarks on the design, please do let me know!

Enter image description here

1 Answer
2
Accepted Answer

Hello.

I think there is no problem with the service itself.
However, EKS requires cluster version control on the user side, so it may be a little difficult for people who are not familiar with Kubernetes operations.
Therefore, if you want to make operations easier, I think it is better to use ECS.
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/Welcome.html

I slightly modified the configuration diagram.
DynamoDB is a resource outside the VPC, so I placed it outside the VPC.
Also, a line was connected from ALB to NAT Gateway, but since NAT Gateway cannot be used for inbound communication, I changed it as follows.
There was no mention of where to save the container image, so I used ECR for now, but DockerHub can also be used.
I think it's also a good idea to use VPC endpoints to access ECR and DynamoDB.
The front end created with Amplify is hosted on S3, so I extended the line from CloudFront to S3.
a

profile picture
EXPERT
answered 7 months ago
profile picture
EXPERT
reviewed 7 months ago
  • If you are concerned about security when running a web application in production, I think it would be a good idea to introduce something like AWS WAF. Please note that as of May 2024, Amplify cannot directly use AWS WAF, so you need to create one CloudFront that is not managed by Amplify. https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/enable-aws-waf-for-web-applications-hosted-by-aws-amplify.html

  • Hi Riku, Thank you so much for your help! I really appreciate the detailed response! I agree that EKS might be difficult to manage, especially for a first project, so I will take your advice and use ECS instead. In the diagram, I would just replace the EKS with ECS and the pods with EC2 instances, correct?

  • If you don't plan to use GPUs, I think using ECS ​​Fargate will make management easier. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Fargate.html

    I would just replace the EKS with ECS and the pods with EC2 instances, correct?

    In the configuration diagram, you need to replace EKS with ECS and replace Pods with tasks. So the configuration diagram will be as follows. a

  • Thank you once again for all your help!

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions