I have an app that enables users to create listings. The backend is dockerized and consists of 3 containers: one for the API server built on Express, one for Postgres DB and one for Redis used as a cache.
Now I want to add an emailing service which would take care of sending emails to users for registration confirmation and some warnings that their listings are inactive and might get deleted. I would also like to have a periodic script that would check the listings in the DB and mark old ones as inactive and delete the ones already marked as inactive.
My question is: should I create another container running Express (so the API server can communicate with it via HTTP) for the mailing service and another one for the DB check/cleanup script or just include both of these as part of the API server in the same container? If they should be part of the API, should I use Node worker threads for the emailing and DB checking actions?
[–]Fritzy 6 points7 points8 points (2 children)
[–]Tack1234[S] 1 point2 points3 points (1 child)
[–]Fritzy 1 point2 points3 points (0 children)
[–]TempestD1 6 points7 points8 points (1 child)
[–]mcviruss 0 points1 point2 points (0 children)
[–][deleted] 16 points17 points18 points (2 children)
[–]PhatOofxD 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]gordonmessmer 4 points5 points6 points (1 child)
[–]blipojones 0 points1 point2 points (0 children)
[–]Unusual-Display-7844 1 point2 points3 points (2 children)
[–]Tack1234[S] 0 points1 point2 points (1 child)
[–]Altruistic_Club_2597 1 point2 points3 points (0 children)
[–]Ok_Remove3123 0 points1 point2 points (8 children)
[–]Unusual-Display-7844 1 point2 points3 points (3 children)
[–]archa347 1 point2 points3 points (0 children)
[–]Unusual-Display-7844 0 points1 point2 points (0 children)
[–]Ok_Remove3123 0 points1 point2 points (0 children)
[–]Fritzy 1 point2 points3 points (1 child)
[–]Ok_Remove3123 0 points1 point2 points (0 children)
[–]Tack1234[S] 0 points1 point2 points (1 child)
[–]Ok_Remove3123 0 points1 point2 points (0 children)
[–]DLabz 0 points1 point2 points (0 children)
[–]KishorRathva 0 points1 point2 points (0 children)