Master and Slave Instances Architecture

0

Hi Dears,

I have a qustion on how to build master EC2 that can communicate with other EC2s based on need and send tasks to them based on a certian code/ group of tasks. Where Master EC2 will take data from RDS db and send data with task to each EC2 based on scudualing and aknowledgamet from each one.

I appriclate your help dears! Thanks Basem

2개 답변
2
수락된 답변

I would probably put the tasks on SQS, then have the "Slaves" (worker nodes) pull the messages from SQS.

If tasks contain a lot of data, save it to S3, and have the SQS message include a path (key) to the object so that the worker can find it.

This will be more robust (retry etc.), you can scale your EC2s based on SQS queue length, and you won't have to deal with service discovery (CloudMap/ALB) and firewalls while staying secure.

Good luck!

//Carl

profile picture
답변함 2년 전
1

Do you want to think of using AWS Batch or serverless compute (StepFunction or a series of Lambda functions) for such use-case?

https://docs.aws.amazon.com/batch/latest/userguide/what-is-batch.html

https://aws.amazon.com/step-functions/

An example serverless batch processing architecture (may or may not be suitable for your use-case, but just an fyi) - https://aws.amazon.com/blogs/compute/creating-aws-serverless-batch-processing-architectures/

profile pictureAWS
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠