the documentation warns that if multiple redundant...
# ory-selfhosting
s
the documentation warns that if multiple redundant copies of kratos are run, only one copy should be watching the courrier message queue. Can anyone explain why? I would have expected that the courrier queue is stored in the backend database and thus shared and interlocked between kratos instances, so any instance can take messages from the queue. I suppose I am asking is what goes wrong if I ignore this advice? (Our installation uses an Active/Active redundant system so there is no master to run courrier upon.)
g
I suppose I am asking is what goes wrong if I ignore this advice?
there may be instances of duplicate email sent because of a possible race condition fetching same record here during dispatching the messages. I don't think courier is designed for having more than one instance running without this side effect.
m
Great explanation, thanks Toba!
s
thank you, this i believe we can live with duplicated emails for now. longer term i guess we will need a different approach - perhaps an html to smtp gateway that can de-duplicate based on the hash of the message. alternatively i may try to modify kratos to prevent duplicate smtp messages (harder)