Skip to content

Commit e73f978

Browse files
committed
minor #14957 [Mailer] Improve documentation for mailer failover and round-robin transports (pableu, Pablo Schläpfer)
This PR was submitted for the 5.x branch but it was merged into the 4.4 branch instead. Discussion ---------- [Mailer] Improve documentation for mailer failover and round-robin transports I think the current documentation for the failover transport is not correct. > If the sending fails, the mailer won’t retry it with the other transports This isn't what really happens. In my tests (and from studying the code), it seems that the mailer simply retries with the next available transport. This is also what one would expect from a **failover**. Failing the first time something goes wrong isn't really a failover ;-) So the only difference between _failover_ and _round-robin_ is that the latter selects a transport at random. My proposed change reflects that more clearly. Commits ------- ad5a890 improve documentation for mailer failover and round-robin transports
2 parents 8bfa680 + ad5a890 commit e73f978

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

mailer.rst

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,9 @@ A failover transport is configured with two or more transports and the
186186
187187
MAILER_DSN="failover(postmark+api://ID@default sendgrid+smtp://KEY@default)"
188188
189-
The mailer will start using the first transport. If the sending fails, the
190-
mailer won't retry it with the other transports, but it will switch to the next
191-
transport automatically for the following deliveries.
189+
The failover-transport starts using the first transport and if it fails, it
190+
will retry the same delivery with the next transports until one of them succeeds
191+
(or until all of them fail).
192192

193193
Load Balancing
194194
~~~~~~~~~~~~~~
@@ -203,9 +203,12 @@ A round-robin transport is configured with two or more transports and the
203203
204204
MAILER_DSN="roundrobin(postmark+api://ID@default sendgrid+smtp://KEY@default)"
205205
206-
The mailer will start using the first transport and if it fails, it will retry
207-
the same delivery with the next transports until one of them succeeds (or until
208-
all of them fail).
206+
The round-robin transport starts with a *randomly* selected transport and
207+
then switches to the next available transport for each subsequent email.
208+
209+
As with the failover transport, round-robin retries deliveries until
210+
a transport succeeds (or all fail). In contrast to the failover transport,
211+
it *spreads* the load across all its transports.
209212

210213
Creating & Sending Messages
211214
---------------------------

0 commit comments

Comments
 (0)