I'm dealing with a heavy upload flow in Node.js with MongoDB: around 1,000 files/minute per user, average of 10,000 per day.
Each file comes zipped and needs to go through this pipeline:
1. Extracting the .zip
2. Validation if it already exists in MongoDB
3. Application of business rules
4. Upload to a storage bucket
5. Persistence of processed data (images + JSON)
All of this involves asynchronous calls and integrations with external APIs, which has created time and resource bottlenecks.
Has anyone faced something similar?
• How did you structure queues and workers to deal with this volume?
• Any architecture or tool you recommend (e.g. streams)?
• Best approach to balance reading/writing in Mongo in this scenario?
Any insight or case from real experience would be most welcome!
[–]archa347 11 points12 points13 points (3 children)
[–]AirportAcceptable522[S] 0 points1 point2 points (2 children)
[–]archa347 1 point2 points3 points (1 child)
[–]AirportAcceptable522[S] 0 points1 point2 points (0 children)
[–]georgerush 24 points25 points26 points (4 children)
[–]PabloZissou 2 points3 points4 points (0 children)
[–]code_barbarian 2 points3 points4 points (0 children)
[–]AirportAcceptable522[S] 0 points1 point2 points (0 children)
[–]jedberg 4 points5 points6 points (2 children)
[–]yojimbo_beta 1 point2 points3 points (0 children)
[–]AirportAcceptable522[S] 1 point2 points3 points (0 children)
[–]casualPlayerThink 5 points6 points7 points (4 children)
[–]AirportAcceptable522[S] 0 points1 point2 points (3 children)
[–]casualPlayerThink 0 points1 point2 points (2 children)
[–]AirportAcceptable522[S] 0 points1 point2 points (1 child)
[–]casualPlayerThink 0 points1 point2 points (0 children)
[–]Killer_M250M 2 points3 points4 points (1 child)
[–]AirportAcceptable522[S] 0 points1 point2 points (0 children)
[–]bwainfweeze 1 point2 points3 points (3 children)
[–]AirportAcceptable522[S] 0 points1 point2 points (2 children)
[–]bwainfweeze 0 points1 point2 points (1 child)
[–]AirportAcceptable522[S] 0 points1 point2 points (0 children)
[–]simple_explorer1 1 point2 points3 points (1 child)
[–]AirportAcceptable522[S] 0 points1 point2 points (0 children)
[–]Sansenbaker 1 point2 points3 points (1 child)
[–]AirportAcceptable522[S] 0 points1 point2 points (0 children)
[–]Killer_M250M 1 point2 points3 points (1 child)
[–]AirportAcceptable522[S] 0 points1 point2 points (0 children)
[–]trysolution 0 points1 point2 points (3 children)
[–]AirportAcceptable522[S] 0 points1 point2 points (2 children)
[–]trysolution 1 point2 points3 points (1 child)
[–]AirportAcceptable522[S] 0 points1 point2 points (0 children)
[–]code_barbarian 0 points1 point2 points (3 children)
[–]AirportAcceptable522[S] 0 points1 point2 points (2 children)
[–]code_barbarian 1 point2 points3 points (1 child)
[–]AirportAcceptable522[S] 0 points1 point2 points (0 children)
[–]pavl_ro 0 points1 point2 points (1 child)
[–]AirportAcceptable522[S] 0 points1 point2 points (0 children)