I am trying to find the best design pattern for two microservices, the first is creating a CSV file (which can get up to 1GB), the second inserts it to the DB.
I thought about 3 designs, but I can't figure out which is better:
- upload the file using HTTP post, during the API call new message will be added to a queue, that will be consumed by a worker
- upload the file to S3, and calling an endpoint in the other service, with file key as argument. new message will be added to the queue, worker will consume it
- CSV service will upload a new file to S3, and write a new message directly to the queue (without posting HTTP request during the process)
please share any thoughts / ideas
Aucun commentaire:
Enregistrer un commentaire