-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add StatefulSet deployment for postfix #304
base: master
Are you sure you want to change the base?
Conversation
38b704d
to
75fe7ae
Compare
Thank you for your PR, we've discussed HA in length within the matrix chat of Mailu, the only issue that still exists is in order to achieve full HA, you'd need to be able to have true HA with Dovecot, which is only supported officially in the paid version for now. |
Even if there is no full HA, partial HA is better then nothing |
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
Would love to have the option. Can`t dovecot ha be achieved with ReadWriteMany PVC? In a short test other than the postfix deployment dovecot scales up without problems and all pods are healthy. |
I just manually created a Statefulset for additional Postfix instances now within the same namespace. And it works like expected. We scaled up the front deployment and made sure the new Statefulset pods match with the service selector for the mailu-postfix service so the loadbalancing works. |
I do see the problem. It probably just didn`t come up in my small test setup.
With a StatefulSet the queue won But isn`t the point of a ha setup here to just bridge the downtime until the replica comes up again. For this usecase you wont lose mails with seperated queues. You just have the risk of some delayed ones which get delivered once the replica comes up again. At least for us that would be more than good enough.
I did not look at that service yet. But thank you very much for your clarification. |
I have clarified on #303 (comment) what you can "scale up" today with 2.0 With master and some work on admin to "stear" clients from front to the same dovecot backends (like dovecot director would) #304 should be possible. The code is at https://github.com/Mailu/Mailu/blob/master/core/admin/mailu/internal/nginx.py#L140 ... for a given username it should always redirect to the same backend (unless that backend is gone in which case it should pick another). It's actually relatively straightforward to do: check redis, if there is something and the backend is still live (one of the entries still in DNS) use that otherwise pick a backend randomly from DNS and update the cache in redis. |
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
@nextgens, you mentioned Dovecot in your comment, but this PR is still about Postfix. The Postfix service can be clustered without any issues when persistent volumes are not shared, as these volumes function only as a spool for Postfix. Emails are randomly delivered to one of the running Postfix services, and each service continues delivering the emails to their targets. |
This will still wreck rate limiting, both inbound and outbound... You may not care about it though. Yes now that what was master has been released it's safer and will mostly work and does add some level of HA provided you also scale front. |
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
We can run multiple postfix instances in a StatefulSet to increase HA