ECS Fargate Application variable data merging issue

0

I have created a docker image and run it through ECS(Fargate). My scenario is I have to run multiple files at a time and each file has to run as per the docker image. The issue I am facing here is let's say files are running in sequential as First completed then start 2, complete 2 then start 3. In this case, I am getting correct results. However, If these files are running in parallel then one file data is merging to other files. Please guide how to resolve this. I tried this by creating 4 tasks as well but every time when files are running in parallel it shows the same behavior.

Please guide is there any configuration issue or what should I do?

1 Answer
0

Hi,

If you are required to run files in sequential order only, what is the reason to start tasks in parallel? For me, it makes no sense even though you can implement that by adding some semaphore/lock.

profile picture
EXPERT
answered 9 months ago
  • Files need to run in parallel as this needs for quick processing. Let's say we have 100 files and each file took 1 minute then overall process will be completed in 100minutesm whereas if these files running in parallel then the process will be completed in 1 minutes to 2 minites

  • But from your explanation, you have correct results ONLY if they are run consequently. Maybe you can PROCESS them in parallel and then concatenate them in a certain order later?

  • Its not possible, I think u didn't get what exactly the problem is. If running in parallel then one file results is merging into other files. Each text file has thousand of words, so processing by docker image and lets say 4 files are running in parallel then all results mixed into these 4 files

  • Yeah, it's still not clear what you expect to have.

    Let's assume we have 3 files: 1.txt (contains two lines, each only one symbol "1"), 2.txt (contains two lines, each only one symbol "2"), 3.txt (contains two lines, each only one symbol "3"). We want to process all 3 files in parallel and calculate the sum of all numbers (one per line), for 1.txt it's 2, for 2.txt it's 4, for 3.txt it's 6.

    Where are you expecting these results to appear? If example is not correct, please provide your.

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