BackgroundService with Channel<T> or bring in Hangfire for about 500 emails an hour
One ASP.NET Core app on a single box with Postgres already there, deploys restart the process two or three times a week. Right now sending is fire and forget with Task.Run from the controller, which I know is wrong, and I have already lost mail to a restart. The two options in front of me are an in-process channel consumed by a hosted service, or pulling in a real job library with a dashboard. What did people with roughly this volume actually end up running?
@pgpolicy_nadia · 2mo ago
Hangfire with the Postgres storage provider is about the smallest amount of work that gets you durability, retries and a dashboard you will actually use at three in the morning. It is a package, a connection string and a couple of lines in startup, and the dashboard alone has justified it for me twice, because being able to see a failed job with its exception and press retry beats writing your own admin screen.
The cost is that it creates and polls its own tables, which on a small box is a background load you should be aware of but which at your volume is irrelevant. Five hundred an hour is roughly one every seven seconds. That is nothing.
Reply
Report