Sent from my iPhone
On 31 Dec 2022, at 13:22, Stephen J. Turnbull <stephenjturnbull@gmail.com> wrote: Tim Cutts writes:
Has anyone considered whether it’s feasible to turn it into a bunch of Lambda functions with a serverless database behind it?
... you just did. I'm not sure if "patches welcome" is appropriate for what looks to me to be a pretty radical idea, but someone could give it a try. :-)
I don't think anybody in Mailman core has thought about it though. I don't really see the advantage for most sites.
Cost and simplifying security updates, principally. The more I think about it the more I suspect it would be too radical a re-write, and it would probably simpler to use Amazon’s SES to send the mail rather than a traditional MTA. People have done simple newsletter type lists this way (https://blog.marcolancini.it/2020/blog-serverless-mailing-list/), and they’re very cheap to run because there’s no permanently running infrastructure, and for smaller sites almost certain to sit within the free tier. Nowhere near as sophisticated in capabilities as Mailman, but easier to keep secure, since most of the underlying dependencies are gone. No operating system to patch, no database upgrades.
Hosts, especially VMs, are cheap, and unless you're running the lists for a major university or the like, lowest tier hosts will do.
That was true until MM3. I had to double the size of VM I use when I went from MM2 to MM3. It’s still not huge, but you can’t easily run MM3 on a free tier VM on AWS any more, it needs too much RAM. I found 2GB is probably the practical minimum.
As for "serverless databases", that depends on whether Django and SQLAlchemy support them. Mailman has a lot of code invested in those ORMs.
Which is why I thought it would actually require a fairly drastic re-write, although of course AWS does offer Pg and MySQL relational databases as a service. That increases the cost again compared to running the DB yourself inside the same VM, but at the benefit of not needing to patch and upgrade the database any more. SQLAlchemy can work with DynamoDB but I’m sure that would have behaviours somewhat different from Postgres or MySQL, and would need some work.
I’m just musing here really.
Regards,
Tim
(PS for full disclosure - I work for AWS, but these comments are in my personal capacity)
Steve